diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-05-09 19:31:48 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-05-09 20:16:16 -0400 |
commit | 23ea9c4dda129fe1711f9fbda03c7a9c91cf1322 (patch) | |
tree | 8924f6fd2399654393d0b41352d40bd07037c470 /kernel/trace/ftrace.c | |
parent | 5ae0bf5972b66d35e5674e1b7d855b1e111a68ae (diff) |
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>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index f104c45cbcc1..dcca9fa29bf4 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2459,7 +2459,7 @@ t_next(struct seq_file *m, void *v, loff_t *pos) | |||
2459 | !ftrace_lookup_ip(ops->notrace_hash, rec->ip)) || | 2459 | !ftrace_lookup_ip(ops->notrace_hash, rec->ip)) || |
2460 | 2460 | ||
2461 | ((iter->flags & FTRACE_ITER_ENABLED) && | 2461 | ((iter->flags & FTRACE_ITER_ENABLED) && |
2462 | !(rec->flags & ~FTRACE_FL_MASK))) { | 2462 | !(rec->flags & FTRACE_FL_ENABLED))) { |
2463 | 2463 | ||
2464 | rec = NULL; | 2464 | rec = NULL; |
2465 | goto retry; | 2465 | goto retry; |