1. 14 10月, 2008 3 次提交
  2. 28 7月, 2008 1 次提交
  3. 11 7月, 2008 2 次提交
    • I
      ftrace: build fix for ftraced_suspend · b2613e37
      Ingo Molnar 提交于
      fix:
      
       kernel/trace/ftrace.c:1615: error: 'ftraced_suspend' undeclared (first use in this function)
       kernel/trace/ftrace.c:1615: error: (Each undeclared identifier is reported only once
       kernel/trace/ftrace.c:1615: error: for each function it appears in.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b2613e37
    • S
      ftrace: add ftrace_kill_atomic · a2bb6a3d
      Steven Rostedt 提交于
      It has been suggested that I add a way to disable the function tracer
      on an oops. This code adds a ftrace_kill_atomic. It is not meant to be
      used in normal situations. It will disable the ftrace tracer, but will
      not perform the nice shutdown that requires scheduling.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a2bb6a3d
  4. 03 7月, 2008 1 次提交
  5. 24 6月, 2008 3 次提交
    • A
      ftrace: avoid modifying kprobe'd records · f22f9a89
      Abhishek Sagar 提交于
      Avoid modifying the mcount call-site if there is a kprobe installed on it.
      These records are not marked as failed however. This allowed the filter
      rules on them to remain up-to-date. Whenever the kprobe on the corresponding
      record is removed, the record gets updated as normal.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f22f9a89
    • A
      ftrace: freeze kprobe'd records · ecea656d
      Abhishek Sagar 提交于
      Let records identified as being kprobe'd be marked as "frozen". The trouble
      with records which have a kprobe installed on their mcount call-site is
      that they don't get updated. So if such a function which is currently being
      traced gets its tracing disabled due to a new filter rule (or because it
      was added to the notrace list) then it won't be updated and continue being
      traced. This patch allows scanning of all frozen records during tracing to
      check if they should be traced.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ecea656d
    • A
      ftrace: store mcount address in rec->ip · 395a59d0
      Abhishek Sagar 提交于
      Record the address of the mcount call-site. Currently all archs except sparc64
      record the address of the instruction following the mcount call-site. Some
      general cleanups are entailed. Storing mcount addresses in rec->ip enables
      looking them up in the kprobe hash table later on to check if they're kprobe'd.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: davem@davemloft.net
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      395a59d0
  6. 16 6月, 2008 1 次提交
  7. 14 6月, 2008 1 次提交
  8. 10 6月, 2008 4 次提交
  9. 02 6月, 2008 1 次提交
    • S
      ftrace: user update and disable dynamic ftrace daemon · ad90c0e3
      Steven Rostedt 提交于
      In dynamic ftrace, the mcount function starts off pointing to a stub
      function that just returns.
      
      On start up, the call to the stub is modified to point to a "record_ip"
      function. The job of the record_ip function is to add the function to
      a pre-allocated hash list. If the function is already there, it simply is
      ignored, otherwise it is added to the list.
      
      Later, a ftraced daemon wakes up and calls kstop_machine if any functions
      have been recorded, and changes the calls to the recorded functions to
      a simple nop.  If no functions were recorded, the daemon goes back to sleep.
      
      The daemon wakes up once a second to see if it needs to update any newly
      recorded functions into nops.  Usually it does not, but if a lot of code
      has been executed for the first time in the kernel, the ftraced daemon
      will call kstop_machine to update those into nops.
      
      The problem currently is that there's no way to stop the daemon from doing
      this, and it can cause unneeded latencies (800us which for some is bothersome).
      
      This patch adds a new file /debugfs/tracing/ftraced_enabled. If the daemon
      is active, reading this will return "enabled\n" and "disabled\n" when the
      daemon is not running. To disable the daemon, the user can echo "0" or
      "disable" into this file, and "1" or "enable" to re-enable the daemon.
      
      Since the daemon is used to convert the functions into nops to increase
      the performance of the system, I also added that anytime something is
      written into the ftraced_enabled file, kstop_machine will run if there
      are new functions that have been detected that need to be converted.
      
      This way the user can disable the daemon but still be able to control the
      conversion of the mcount calls to nops by simply,
      
        "echo 0 > /debugfs/tracing/ftraced_enabled"
      
      when they need to do more conversions.
      
      To see the number of converted functions:
      
        "cat /debugfs/tracing/dyn_ftrace_total_info"
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ad90c0e3
  10. 27 5月, 2008 3 次提交
    • A
      ftrace: fix updating of ftrace_update_cnt · 492a7ea5
      Abhishek Sagar 提交于
      Hi Ingo/Steven,
      
      Ftrace currently maintains an update count which includes false updates,
      i.e, updates which failed. If anything, such failures should be tracked
      by some separate variable, but this patch provides a minimal fix.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: rostedt@goodmis.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      492a7ea5
    • A
      ftrace: safe traversal of ftrace_hash hlist · ffdaa358
      Abhishek Sagar 提交于
      Hi Steven,
      
      I noticed that concurrent instances of ftrace_record_ip()
      have a race between ftrace_hash list traversal during
      ftrace_ip_in_hash() (before acquiring ftrace_shutdown_lock)
      and ftrace_add_hash(). If it's so then this should fix it.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: rostedt@goodmis.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ffdaa358
    • S
      ftrace: set_ftrace_notrace feature · 41c52c0d
      Steven Rostedt 提交于
      While debugging latencies in the RT kernel, I found that it would be nice
      to be able to filter away functions from the trace than just to filter
      on functions.
      
      I added a new interface to the debugfs tracing directory called
      
        set_ftrace_notrace
      
      When dynamic frace is enabled, this lets you filter away functions that will
      not be recorded in the trace. It is similar to adding 'notrace' to those
      functions but by doing it without recompiling the kernel.
      
      Here's how set_ftrace_filter and set_ftrace_notrace interact. Remember, if
      set_ftrace_filter is set, it removes all functions from the trace execpt for
      those listed in the set_ftrace_filter. set_ftrace_notrace will prevent those
      functions from being traced.
      
      If you were to set one function in both set_ftrace_filter and
      set_ftrace_notrace and that function was the same, then you would end up
      with an empty trace.
      
      the set of functions to trace is:
      
        set_ftrace_filter == empty then
      
           all functions not in set_ftrace_notrace
      
        else
      
           set of the set_ftrace_filter and not in set of set_ftrace_notrace.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      41c52c0d
  11. 24 5月, 2008 20 次提交