]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ftrace: show unlimited when traceon or traceoff has no counter
authorSteven Rostedt <srostedt@redhat.com>
Tue, 17 Feb 2009 18:12:12 +0000 (13:12 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Tue, 17 Feb 2009 18:12:12 +0000 (13:12 -0500)
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@redhat.com>
kernel/trace/trace_functions.c

index 6ea73ed03bfa9599285e0ee8479fdb64d822eabe..4c113a8c466ff08b8655255f6361f59d48a7908d 100644 (file)
@@ -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');