summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_events_trigger.c
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2015-12-10 12:50:48 -0600
committerSteven Rostedt <rostedt@goodmis.org>2016-03-08 11:19:34 -0500
commita5863dae84e2da83a1e5de485a7f150d0c28f08e (patch)
tree4fc823d2b4c49168d706097cdc0a2bbe8c4575af /kernel/trace/trace_events_trigger.c
parent104f281044a9c2ac86b851bbebbf74500172b625 (diff)
tracing: Add needs_rec flag to event triggers
Add a new needs_rec flag for triggers that require unconditional access to trace records in order to function. Normally a trigger requires access to the contents of a trace record only if it has a filter associated with it (since filters need the contents of a record in order to make a filtering decision). Some types of triggers, such as 'hist' triggers, require access to trace record contents independent of the presence of filters, so add a new flag for those triggers. Link: http://lkml.kernel.org/r/7be8fa38f9b90fdb6c47ca0f98d20a07b9fd512b.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/trace_events_trigger.c')
-rw-r--r--kernel/trace/trace_events_trigger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index e4d8b3763175..a11bb4780f82 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -493,7 +493,8 @@ void update_cond_flag(struct trace_event_file *file)
bool set_cond = false;
list_for_each_entry_rcu(data, &file->triggers, list) {
- if (data->filter || data->cmd_ops->post_trigger) {
+ if (data->filter || data->cmd_ops->post_trigger ||
+ data->cmd_ops->needs_rec) {
set_cond = true;
break;
}