Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1174090

[PATCH v8 06/23] tracing: Add a per-event-trigger 'paused' field

Path csiph.com!aioe.org!eternal-september.org!feeder.eternal-september.org!news.szaf.org!feedme.news.telefonica.de!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod
From Tom Zanussi <tom.zanussi@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v8 06/23] tracing: Add a per-event-trigger 'paused' field
Date Mon, 29 Jun 2015 22:50:02 +0200
Message-ID <pGOa6-5LB-15@gated-at.bofh.it> (permalink)
References <pGO0p-5z1-3@gated-at.bofh.it>
X-Original-To rostedt@goodmis.org
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.15,372,1432623600"; d="scan'208";a="516141346"
X-Mailer git-send-email 1.9.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 53
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Mon, 29 Jun 2015 15:34:08 -0500
X-Original-Message-ID <c8807b0e13d439c10d070370fb476b6daa452a10.1435607463.git.tom.zanussi@linux.intel.com>
X-Original-References <cover.1435607463.git.tom.zanussi@linux.intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1174090

Show key headers only | View raw


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 6fe5b66..5e675b2 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 e30539c..5f632ff 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;
@@ -109,6 +111,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);
 	}
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 00/23] tracing: 'hist' triggers Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:40 +0200
  [PATCH v8 01/23] tracing: Update cond flag when enabling or disabling a trigger Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:40 +0200
  [PATCH v8 10/23] tracing: Add hist trigger support for compound keys Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:50 +0200
  [PATCH v8 06/23] tracing: Add a per-event-trigger 'paused' field Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:50 +0200
  [PATCH v8 11/23] tracing: Add hist trigger support for user-defined sorting ('sort=' param) Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:50 +0200
  [PATCH v8 09/23] tracing: Add hist trigger support for multiple values ('vals=' param) Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:50 +0200
  [PATCH v8 08/23] tracing: Add 'hist' event trigger command Tom Zanussi <tom.zanussi@linux.intel.com> - 2015-06-29 22:50 +0200

csiph-web