1. 23 11月, 2008 6 次提交
    • S
      trace: fix compiler warning in branch profiler · 0429149f
      Steven Rostedt 提交于
      Impact: fix compiler warning
      
      The ftrace_pointers used in the branch profiler are constant values.
      They should never change. But the compiler complains when they are
      passed into the debugfs_create_file as a data pointer, because the
      function discards the qualifier.
      
      This patch typecasts the parameter to debugfs_create_file back to
      a void pointer. To remind the callbacks that they are pointing to
      a constant value, I also modified the callback local pointers to
      be const struct ftrace_pointer * as well.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0429149f
    • S
      trace: profile all if conditionals · 2bcd521a
      Steven Rostedt 提交于
      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: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2bcd521a
    • S
      trace: branch profiling should not print percent without data · bac28bfe
      Steven Rostedt 提交于
      Impact: cleanup on output of branch profiler
      
      When a branch has not been taken, it does not make sense to show
      a percentage incorrect or hit. This patch changes the behaviour
      to print out a 'X' when the branch has not been executed yet.
      
      For example:
      
       correct incorrect  %        Function                  File              Line
       ------- ---------  -        --------                  ----              ----
          2096        0   0 do_arch_prctl                  process_64.c         832
             0        0   X do_arch_prctl                  process_64.c         804
          2604        0   0 IS_ERR                         err.h                34
        130228     5765   4 __switch_to                    process_64.c         673
             0        0   X enable_TSC                     process_64.c         448
             0        0   X disable_TSC                    process_64.c         431
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bac28bfe
    • S
      trace: consolidate unlikely and likely profiler · 45b79749
      Steven Rostedt 提交于
      Impact: clean up to make one profiler of like and unlikely tracer
      
      The likely and unlikely profiler prints out the file and line numbers
      of the annotated branches that it is profiling. It shows the number
      of times it was correct or incorrect in its guess. Having two
      different files or sections for that matter to tell us if it was a
      likely or unlikely is pretty pointless. We really only care if
      it was correct or not.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      45b79749
    • S
      trace: remove extra assign in branch check · 42f565e1
      Steven Rostedt 提交于
      Impact: clean up of branch check
      
      The unlikely/likely profiler does an extra assign of the f.line.
      This is not needed since it is already calculated at compile time.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      42f565e1
    • I
  2. 21 11月, 2008 26 次提交
  3. 20 11月, 2008 8 次提交