]> Pileus Git - ~andy/linux/commit
tracing: Show available event triggers when no trigger is set
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 7 Jan 2014 15:31:04 +0000 (10:31 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 10 Jan 2014 02:20:32 +0000 (21:20 -0500)
commitdd97b95438c812d8fd93d9426661a6c8e1520005
tree1fa83336880595da7dc881fde5aab453d17e12ab
parent13a1e4aef53b2a7684ddee374e749999ba103b4a
tracing: Show available event triggers when no trigger is set

Currently there's no way to know what triggers exist on a kernel without
looking at the source of the kernel or randomly trying out triggers.
Instead of creating another file in the debugfs system, simply show
what available triggers are there when cat'ing the trigger file when
it has no events:

 [root /sys/kernel/debug/tracing]# cat events/sched/sched_switch/trigger
 # Available triggers:
 # traceon traceoff snapshot stacktrace enable_event disable_event

This stays consistent with other debugfs files where meta data like
this is always proceeded with a '#' at the start of the line so that
tools can strip these out.

Link: http://lkml.kernel.org/r/20140107103548.0a84536d@gandalf.local.home
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_trigger.c