• 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