diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2015-12-10 12:50:47 -0600 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-03-08 11:19:33 -0500 |
commit | 104f281044a9c2ac86b851bbebbf74500172b625 (patch) | |
tree | ebc925dd6a31972a6c861bb4cd67d71639da795a /kernel/trace | |
parent | dbfeaa7abae4f105afdf8ed4f85b5879cff136ea (diff) | |
download | linux-104f281044a9c2ac86b851bbebbf74500172b625.tar.bz2 |
tracing: Add a per-event-trigger 'paused' field
Add a simple per-trigger 'paused' flag, allowing individual triggers
to pause. We could leave it to individual triggers that need this
functionality to do it themselves, but we also want to allow other
events to control pausing, so add it to the trigger data.
Link: http://lkml.kernel.org/r/fed37e4879684d7dcc57fe00ce0cbf170032b06d.1449767187.git.tom.zanussi@linux.intel.com
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.h | 1 | ||||
-rw-r--r-- | kernel/trace/trace_events_trigger.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 0044b91d5469..f1868677f856 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -1172,6 +1172,7 @@ struct event_trigger_data { struct event_filter __rcu *filter; char *filter_str; void *private_data; + bool paused; struct list_head list; }; diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index 0a62887c63c0..e4d8b3763175 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c @@ -72,6 +72,8 @@ event_triggers_call(struct trace_event_file *file, void *rec) return tt; list_for_each_entry_rcu(data, &file->triggers, list) { + if (data->paused) + continue; if (!rec) { data->ops->func(data, rec); continue; @@ -110,6 +112,8 @@ event_triggers_post_call(struct trace_event_file *file, struct event_trigger_data *data; list_for_each_entry_rcu(data, &file->triggers, list) { + if (data->paused) + continue; if (data->cmd_ops->trigger_type & tt) data->ops->func(data, rec); } |