From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: rostedt@goodmis.org
Cc: daniel.wagner@bmw-carit.de, masami.hiramatsu.pt@hitachi.com,
namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org,
linux-kernel@vger.kernel.org,
Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [PATCH v5 05/10] tracing: Add a per-event-trigger 'paused' field
Date: Wed, 20 May 2015 16:19:52 -0500 [thread overview]
Message-ID: <b110e7f630400d52506c44b3dbdeb31ecaa1b7c3.1432151408.git.tom.zanussi@linux.intel.com> (raw)
In-Reply-To: <cover.1432151408.git.tom.zanussi@linux.intel.com>
In-Reply-To: <cover.1432151408.git.tom.zanussi@linux.intel.com>
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.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
kernel/trace/trace.h | 1 +
kernel/trace/trace_events_trigger.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 46555ba..56fd2db 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1110,6 +1110,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 c8feeb7..9438abc 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -73,6 +73,8 @@ event_triggers_call(struct ftrace_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 ftrace_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);
}
--
1.9.3
next prev parent reply other threads:[~2015-05-20 21:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 21:19 [PATCH v5 00/10] tracing: 'hist' triggers Tom Zanussi
2015-05-20 21:19 ` [PATCH 01/10] tracing: Update cond flag when enabling or disabling a trigger Tom Zanussi
2015-05-21 7:21 ` Masami Hiramatsu
2015-05-20 21:19 ` [PATCH v5 02/10] tracing: Make ftrace_event_field checking functions available Tom Zanussi
2015-05-20 21:19 ` [PATCH v5 03/10] tracing: Add event record param to trigger_ops.func() Tom Zanussi
2015-05-20 21:19 ` [PATCH v5 04/10] tracing: Add get_syscall_name() Tom Zanussi
2015-05-20 21:19 ` Tom Zanussi [this message]
2015-05-20 21:19 ` [PATCH v5 06/10] trace: Add lock-free tracing_map Tom Zanussi
2015-05-20 21:19 ` [PATCH v5 07/10] tracing: Add 'hist' event trigger command Tom Zanussi
2015-05-20 21:19 ` [PATCH v5 08/10] tracing: Add enable_hist/disable_hist triggers Tom Zanussi
2015-05-20 21:19 ` [PATCH v5 09/10] tracing: Add 'hist' trigger Documentation Tom Zanussi
2015-05-20 21:19 ` [PATCH 10/10][RFC] ftrace: Add function_hist tracer Tom Zanussi
2015-05-21 8:08 ` [PATCH v5 00/10] tracing: 'hist' triggers Masami Hiramatsu
2015-05-21 15:26 ` Tom Zanussi
2015-05-21 21:50 ` Masami Hiramatsu
2015-05-21 13:55 ` Steven Rostedt
2015-05-21 14:29 ` Tom Zanussi
2015-05-21 14:31 ` Steven Rostedt
2015-05-21 14:37 ` Tom Zanussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b110e7f630400d52506c44b3dbdeb31ecaa1b7c3.1432151408.git.tom.zanussi@linux.intel.com \
--to=tom.zanussi@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®