1. 20 Dec, 2008 1 commit
    • Markus Metzger's avatar
      x86, bts: add fork and exit handling · bf53de90
      Markus Metzger authored
      
      Impact: introduce new ptrace facility
      
      Add arch_ptrace_untrace() function that is called when the tracer
      detaches (either voluntarily or when the tracing task dies);
      ptrace_disable() is only called on a voluntary detach.
      
      Add ptrace_fork() and arch_ptrace_fork(). They are called when a
      traced task is forked.
      
      Clear DS and BTS related fields on fork.
      
      Release DS resources and reclaim memory in ptrace_untrace(). This
      releases resources already when the tracing task dies. We used to do
      that when the traced task dies.
      Signed-off-by: default avatarMarkus Metzger <markus.t.metzger@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bf53de90
  2. 19 Dec, 2008 1 commit
  3. 18 Dec, 2008 8 commits
    • Ingo Molnar's avatar
      tracing: fix warnings in kernel/trace/trace_sched_switch.c · c71dd42d
      Ingo Molnar authored
      
      these warnings:
      
        kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_register’:
        kernel/trace/trace_sched_switch.c:96: warning: passing argument 1 of ‘register_trace_sched_wakeup_new’ from incompatible pointer type
        kernel/trace/trace_sched_switch.c:112: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type
        kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_unregister’:
        kernel/trace/trace_sched_switch.c:121: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type
      
      Trigger because sched_wakeup_new tracepoints need the same trace
      signature as sched_wakeup - which was changed recently.
      
      Fix it.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c71dd42d
    • Ingo Molnar's avatar
      tracing: fix warning in kernel/trace/trace.c · 3bddb9a3
      Ingo Molnar authored
      
      this warning:
      
        kernel/trace/trace.c: In function ‘print_lat_fmt’:
        kernel/trace/trace.c:1826: warning: unused variable ‘state’
      
      Triggers because 'state' has become unused - remove it.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3bddb9a3
    • Lai Jiangshan's avatar
      tracing/ring-buffer: remove unused ring_buffer size · 6d102bc6
      Lai Jiangshan authored
      
      Impact: remove dead code
      
      struct ring_buffer.size is not set after ring_buffer is initialized
      or resized. it is always 0.
      
      we can use "buffer->pages * PAGE_SIZE" to get ring_buffer's size
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6d102bc6
    • Thomas Gleixner's avatar
      trace: fix task state printout · 3d9101e9
      Thomas Gleixner authored
      
      Impact: fix occasionally incorrect trace output
      
      The tracing code has interesting varieties of printing out task state.
      
      Unfortunalely only one of the instances is correct as it copies the
      code from sched.c:sched_show_task(). The others are plain wrong as
      they treatthe bitfield as an integer offset into the character
      array. Also the size check of the character array is wrong as it
      includes the trailing \0.
      
      Use a common state decoder inline which does the Right Thing.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3d9101e9
    • Steven Rostedt's avatar
      ftrace: add not to regex on filtering functions · ea3a6d6d
      Steven Rostedt authored
      
      Impact: enhancement
      
      Ingo Molnar has asked about a way to remove items from the filter
      lists. Currently, you can only add or replace items. The way
      items are added to the list is through opening one of the list
      files (set_ftrace_filter or set_ftrace_notrace) via append.
      If the file is opened for truncate, the list is cleared.
      
        echo spin_lock > /debug/tracing/set_ftrace_filter
      
      The above will replace the list with only spin_lock
      
        echo spin_lock >> /debug/tracing/set_ftrace_filter
      
      The above will add spin_lock to the list.
      
      Now this patch adds:
      
        echo '!spin_lock' >> /debug/tracing/set_ftrace_filter
      
      This will remove spin_lock from the list.
      
      The limited glob features of these lists also can be notted.
      
        echo '!spin_*' >> /debug/tracing/set_ftrace_filter
      
      This will remove all functions that start with 'spin_'
      
      Note:
      
        echo '!spin_*' > /debug/tracing/set_ftrace_filter
      
      will simply clear out the list (notice the '>' instead of '>>')
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ea3a6d6d
    • Steven Rostedt's avatar
      trace: better use of stack_trace_enabled for boot up code · e05a43b7
      Steven Rostedt authored
      
      Impact: clean up
      
      Andrew Morton suggested to use the stack_tracer_enabled variable
      to decide whether or not to start stack tracing on bootup.
      This lets us remove the start_stack_trace variable.
      Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e05a43b7
    • Steven Rostedt's avatar
      trace: add a way to enable or disable the stack tracer · f38f1d2a
      Steven Rostedt authored
      
      Impact: enhancement to stack tracer
      
      The stack tracer currently is either on when configured in or
      off when it is not. It can not be disabled when it is configured on.
      (besides disabling the function tracer that it uses)
      
      This patch adds a way to enable or disable the stack tracer at
      run time. It defaults off on bootup, but a kernel parameter 'stacktrace'
      has been added to enable it on bootup.
      
      A new sysctl has been added "kernel.stack_tracer_enabled" to let
      the user enable or disable the stack tracer at run time.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f38f1d2a
    • Ingo Molnar's avatar
  4. 17 Dec, 2008 26 commits
  5. 16 Dec, 2008 4 commits