[PATCH 6/6] ftrace: show unlimited when traceon or traceoff has no counter

From: Steven Rostedt
Date: Tue Feb 17 2009 - 13:23:33 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

Impact: clean up

The traceon and traceoff function probes are confusing to developers
to what happens when a counter is not specified. This should help
clear things up.

# echo "*:traceoff" > set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter

#### all functions enabled ####
do_fork:traceoff:unlimited

Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
kernel/trace/trace_functions.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index 6ea73ed..4c113a8 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -296,7 +296,9 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip,
else
seq_printf(m, "traceoff");

- if (count != -1)
+ if (count == -1)
+ seq_printf(m, ":unlimited\n");
+ else
seq_printf(m, ":count=%ld", count);
seq_putc(m, '\n');

--
1.5.6.5

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/