Skip to content
  • Steven Rostedt (Red Hat)'s avatar
    ftrace: Fix the output of enabled_functions debug file · 23ea9c4d
    Steven Rostedt (Red Hat) authored
    
    
    The enabled_functions debugfs file was created to be able to see
    what functions have been modified from nops to calling a tracer.
    
    The current method uses the counter in the function record.
    As when a ftrace_ops is registered to a function, its count
    increases. But that doesn't mean that the function is actively
    being traced. /proc/sys/kernel/ftrace_enabled can be set to zero
    which would disable it, as well as something can go wrong and
    we can think its enabled when only the counter is set.
    
    The record's FTRACE_FL_ENABLED flag is set or cleared when its
    function is modified. That is a much more accurate way of knowing
    what function is enabled or not.
    
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    23ea9c4d