1. 18 3月, 2009 3 次提交
  2. 17 3月, 2009 3 次提交
    • S
      tracing: stop comm recording on tracing off · 6adaad14
      Steven Rostedt 提交于
      Impact: fix for losing comms in trace
      
      The command lines of tasks are cached at sched switch to not need
      to record them at every trace point.  Disabling the tracing on stops
      the recording of traces, but does not stop the caching of command lines.
      When the tracing is off the cache may overflow and cause the tracing
      to show incorrect tasks matching the PIDs.
      
      This patch disables prevents updates to the comm cache when the ring buffer
      is off.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      6adaad14
    • S
      tracing: protect reader of cmdline output · 4ca53085
      Steven Rostedt 提交于
      Impact: fix to one cause of incorrect comm outputs in trace
      
      The spinlock only protected the creation of a comm <=> pid pair.
      But it was possible that a reader could look up a pid, and get the
      wrong comm because it had no locking.
      
      This also required changing trace_find_cmdline to copy the comm cache
      and not just send back a pointer to it.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      4ca53085
    • F
      tracing/ftrace: fix the check on nopped sites · 03303549
      Frederic Weisbecker 提交于
      Impact: fix a dynamic tracing failure
      
      Recently, the function and function graph tracers failed to use dynamic
      tracing after the following commit:
      
      fa9d13cf
      (ftrace: don't try to __ftrace_replace_code on !FTRACE_FL_CONVERTED rec)
      
      The patch is right except a mistake on the check for the FTRACE_FL_CONVERTED
      flag. The code patching is aborted in case of successfully nopped sites.
      What we want is the opposite: ignore the callsites that haven't been nopped.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      03303549
  3. 14 3月, 2009 1 次提交
    • L
      kallsyms, tracing: output more proper symbol name · b478b782
      Lai Jiangshan 提交于
      Impact: bugfix, output more reliable symbol lookup result
      
      Debug tools(dump_stack(), ftrace...) are like to print out symbols.
      But it is always print out the first aliased symbol.(Aliased symbols
      are symbols with the same address), and the first aliased symbol is
      sometime not proper.
      
       # echo function_graph > current_tracer
       # cat trace
      ......
       1)   1.923 us    |    select_nohz_load_balancer();
       1) + 76.692 us   |  }
       1)               |  default_idle() {
       1)   ==========> |    __irqentry_text_start() {
       1)   0.000 us    |      native_apic_mem_write();
       1)               |      irq_enter() {
       1)   0.000 us    |        idle_cpu();
       1)               |        tick_check_idle() {
       1)   0.000 us    |          tick_check_oneshot_broadcast();
       1)               |          tick_nohz_stop_idle() {
      ......
      
      It's very embarrassing, it ouputs "__irqentry_text_start()",
      actually, it should output "smp_apic_timer_interrupt()".
      (these two symbol are the same address, but "__irqentry_text_start"
      is deemed to the first aliased symbol by scripts/kallsyms)
      
      This patch puts symbols like "__irqentry_text_start" to the second
      aliased symbols. And a more proper symbol name becomes the first.
      
      Aliased symbols mostly come from linker script. The solution is
      guessing "is this symbol defined in linker script", the symbols
      defined in linker script will not become the first aliased symbol.
      
      And if symbols are found to be equal in this "linker script provided"
      criteria, symbols are sorted by the number of prefix underscores.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: NPaulo Marques <pmarques@grupopie.com>
      LKML-Reference: <49BA06E2.7080807@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b478b782
  4. 13 3月, 2009 33 次提交