]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Fix the output of enabled_functions debug file
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Thu, 9 May 2013 23:31:48 +0000 (19:31 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 10 May 2013 00:16:16 +0000 (20:16 -0400)
commitde685b3f735d47d32b6ef8259f858fa13ef0822d
tree8924f6fd2399654393d0b41352d40bd07037c470
parenta3574197e235b392f10e3a0e58908f3c954b5e46
ftrace: Fix the output of enabled_functions debug file

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: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c