• Steven Rostedt (Red Hat)'s avatar
    tracing: Always show all tracer options in the options directory · 41d9c0be
    Steven Rostedt (Red Hat) authored
    There are options that are unique to a specific tracer (like function and
    function graph). Currently, these options are only visible in the options
    directory when the tracer is enabled.
    
    This has been a pain, especially for something like the func_stack_trace
    option that if used inappropriately, could bring the system to a crawl. But
    the only way to see it, is to enable the function tracer.
    
    For example, if one had done:
    
     # cd /sys/kernel/tracing
     # echo __schedule > set_ftrace_filter
     # echo 1 > options/func_stack_trace
     # echo function > current_tracer
    
    The __schedule call will be traced and a stack trace will also be recorded
    there. Now when you were done, you may do...
    
     # echo nop > current_tracer
     # echo > set_ftrace_filter
    
    But you forgot to disable the func_stack_trace. The only way to disable it
    is to re-enable function tracing first. If you do not add a filter to
    set_ftrace_filter and just do:
    
     # echo function > current_tracer
    
    Now you would be performing a stack trace on *every* function! On some
    systems, that causes a live lock. Others may take a few minutes to fix your
    mistake.
    
    Having the func_stack_trace option visible allows you to check it and
    disable it before enabling the funtion tracer.
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    41d9c0be
trace.h 41.1 KB