1. 23 Nov, 2008 6 commits
    • Steven Rostedt's avatar
      trace: fix compiler warning in branch profiler · 0429149f
      Steven Rostedt authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0429149f
    • Steven Rostedt's avatar
      trace: profile all if conditionals · 2bcd521a
      Steven Rostedt authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2bcd521a
    • Steven Rostedt's avatar
      trace: branch profiling should not print percent without data · bac28bfe
      Steven Rostedt authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bac28bfe
    • Steven Rostedt's avatar
      trace: consolidate unlikely and likely profiler · 45b79749
      Steven Rostedt authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      45b79749
    • Steven Rostedt's avatar
      trace: remove extra assign in branch check · 42f565e1
      Steven Rostedt authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      42f565e1
    • Ingo Molnar's avatar
  2. 21 Nov, 2008 2 commits
    • Liming Wang's avatar
      function tracing: fix wrong position computing of stack_trace · 522a110b
      Liming Wang authored
      Impact: make output of stack_trace complete if buffer overruns
      
      When read buffer overruns, the output of stack_trace isn't complete.
      
      When printing records with seq_printf in t_show, if the read buffer
      has overruned by the current record, then this record won't be
      printed to user space through read buffer, it will just be dropped in
      this printing.
      
      When next printing, t_start should return the "*pos"th record, which
      is the one dropped by previous printing, but it just returns
      (m->private + *pos)th record.
      
      Here we use a more sane method to implement seq_operations which can
      be found in kernel code. Thus we needn't initialize m->private.
      
      About testing, it's not easy to overrun read buffer, but we can use
      seq_printf to print more padding bytes in t_show, then it's easy to
      check whether or not records are lost.
      
      This commit has been tested on both condition of overrun and non
      overrun.
      Signed-off-by: default avatarLiming Wang <liming.wang@windriver.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      522a110b
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · ed313489
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings
        [ARM] pxa: fix incorrect PCMCIA PSKTSEL pin configuration for spitz
        [ARM] pxa: fix I2C controller device being registered twice on Akita
        pxafb: only initialize the smart panel thread when dealing with a smartpanel
        pxafb: introduce LCD_TYPE_MASK and use it.
      ed313489
  3. 20 Nov, 2008 32 commits