aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace_event.h
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2013-10-24 09:59:28 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-12-21 22:02:16 -0500
commit7862ad1846e994574cb47dc503cc2b1646ea6593 (patch)
treecec348fd60d6f85d1ae772996d0b8241a31d5b35 /include/linux/ftrace_event.h
parentf21ecbb35f865a508073c0e73854da469a07f278 (diff)
tracing: Add 'enable_event' and 'disable_event' event trigger commands
Add 'enable_event' and 'disable_event' event_command commands. enable_event and disable_event event triggers are added by the user via these commands in a similar way and using practically the same syntax as the analagous 'enable_event' and 'disable_event' ftrace function commands, but instead of writing to the set_ftrace_filter file, the enable_event and disable_event triggers are written to the per-event 'trigger' files: echo 'enable_event:system:event' > .../othersys/otherevent/trigger echo 'disable_event:system:event' > .../othersys/otherevent/trigger The above commands will enable or disable the 'system:event' trace events whenever the othersys:otherevent events are hit. This also adds a 'count' version that limits the number of times the command will be invoked: echo 'enable_event:system:event:N' > .../othersys/otherevent/trigger echo 'disable_event:system:event:N' > .../othersys/otherevent/trigger Where N is the number of times the command will be invoked. The above commands will will enable or disable the 'system:event' trace events whenever the othersys:otherevent events are hit, but only N times. This also makes the find_event_file() helper function extern, since it's useful to use from other places, such as the event triggers code, so make it accessible. Link: http://lkml.kernel.org/r/f825f3048c3f6b026ee37ae5825f9fc373451828.1382622043.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r--include/linux/ftrace_event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 65caee44b4a9..2f73c3988fc7 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -348,6 +348,7 @@ enum event_trigger_type {
348 ETT_TRACE_ONOFF = (1 << 0), 348 ETT_TRACE_ONOFF = (1 << 0),
349 ETT_SNAPSHOT = (1 << 1), 349 ETT_SNAPSHOT = (1 << 1),
350 ETT_STACKTRACE = (1 << 2), 350 ETT_STACKTRACE = (1 << 2),
351 ETT_EVENT_ENABLE = (1 << 3),
351}; 352};
352 353
353extern void destroy_preds(struct ftrace_event_file *file); 354extern void destroy_preds(struct ftrace_event_file *file);