1. 27 Jul, 2008 1 commit
  2. 11 Jul, 2008 2 commits
    • Ingo Molnar's avatar
      ftrace: build fix for ftraced_suspend · b2613e37
      Ingo Molnar authored
      
      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: default avatarIngo Molnar <mingo@elte.hu>
      b2613e37
    • Steven Rostedt's avatar
      ftrace: add ftrace_kill_atomic · a2bb6a3d
      Steven Rostedt authored
      
      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: default avatarSteven 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: default avatarIngo Molnar <mingo@elte.hu>
      a2bb6a3d
  3. 03 Jul, 2008 1 commit
  4. 23 Jun, 2008 3 commits
    • Abhishek Sagar's avatar
      ftrace: avoid modifying kprobe'd records · f22f9a89
      Abhishek Sagar authored
      
      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: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f22f9a89
    • Abhishek Sagar's avatar
      ftrace: freeze kprobe'd records · ecea656d
      Abhishek Sagar authored
      
      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: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ecea656d
    • Abhishek Sagar's avatar
      ftrace: store mcount address in rec->ip · 395a59d0
      Abhishek Sagar authored
      
      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: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: davem@davemloft.net
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      395a59d0
  5. 16 Jun, 2008 1 commit
  6. 14 Jun, 2008 1 commit
  7. 10 Jun, 2008 4 commits
  8. 02 Jun, 2008 1 commit
    • Steven Rostedt's avatar
      ftrace: user update and disable dynamic ftrace daemon · ad90c0e3
      Steven Rostedt authored
      
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ad90c0e3
  9. 26 May, 2008 3 commits
    • Abhishek Sagar's avatar
      ftrace: fix updating of ftrace_update_cnt · 492a7ea5
      Abhishek Sagar authored
      
      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: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: rostedt@goodmis.org
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      492a7ea5
    • Abhishek Sagar's avatar
      ftrace: safe traversal of ftrace_hash hlist · ffdaa358
      Abhishek Sagar authored
      
      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: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: rostedt@goodmis.org
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ffdaa358
    • Steven Rostedt's avatar
      ftrace: set_ftrace_notrace feature · 41c52c0d
      Steven Rostedt authored
      
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      41c52c0d
  10. 23 May, 2008 21 commits