Selaa lähdekoodia

ftrace: show unlimited when traceon or traceoff has no counter

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>
Steven Rostedt 16 vuotta sitten
vanhempi
commit
35ebf1caa4
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      kernel/trace/trace_functions.c

+ 3 - 1
kernel/trace/trace_functions.c

@@ -296,7 +296,9 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip,
 	else
 	else
 		seq_printf(m, "traceoff");
 		seq_printf(m, "traceoff");
 
 
-	if (count != -1)
+	if (count == -1)
+		seq_printf(m, ":unlimited\n");
+	else
 		seq_printf(m, ":count=%ld", count);
 		seq_printf(m, ":count=%ld", count);
 	seq_putc(m, '\n');
 	seq_putc(m, '\n');