]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
trace: profile all if conditionals
authorSteven Rostedt <srostedt@redhat.com>
Fri, 21 Nov 2008 06:30:54 +0000 (01:30 -0500)
committerIngo Molnar <mingo@elte.hu>
Sun, 23 Nov 2008 10:41:01 +0000 (11:41 +0100)
commit2bcd521a684cc94befbe2ce7d5b613c841b0d304
tree63bc4dbc52defa27c8cac9e46dddadfcb36c1c7a
parentbac28bfe42ba98ee67503f78984d1d5e1ebbbb78
trace: profile all if conditionals

Impact: feature to profile if statements

This patch adds a branch profiler for all if () statements.
The results will be found in:

  /debugfs/tracing/profile_branch

For example:

   miss      hit    %        Function                  File              Line
 ------- ---------  -        --------                  ----              ----
       0        1 100 x86_64_start_reservations      head64.c             127
       0        1 100 copy_bootdata                  head64.c             69
       1        0   0 x86_64_start_kernel            head64.c             111
      32        0   0 set_intr_gate                  desc.h               319
       1        0   0 reserve_ebda_region            head.c               51
       1        0   0 reserve_ebda_region            head.c               47
       0        1 100 reserve_ebda_region            head.c               42
       0        0   X maxcpus                        main.c               165

Miss means the branch was not taken. Hit means the branch was taken.
The percent is the percentage the branch was taken.

This adds a significant amount of overhead and should only be used
by those analyzing their system.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-generic/vmlinux.lds.h
include/linux/compiler.h
kernel/trace/Kconfig
kernel/trace/trace_branch.c