From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [for-next][PATCH 3/5] tracing: Fix counter for traceon/off event triggers
Date: Fri, 10 Jan 2014 10:20:07 -0500 [thread overview]
Message-ID: <20140110152100.485765227@goodmis.org> (raw)
In-Reply-To: 20140110152004.200225053@goodmis.org
[-- Attachment #1: 0003-tracing-Fix-counter-for-traceon-off-event-triggers.patch --]
[-- Type: text/plain, Size: 1443 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
The counters for the traceon and traceoff are only suppose to decrement
when the trigger enables or disables tracing. It is not suppose to decrement
every time the event is hit.
Only decrement the counter if the trigger actually did something.
Link: http://lkml.kernel.org/r/20140106223124.0e5fd0b4@gandalf.local.home
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_events_trigger.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index f6dd115..a53e0da 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -742,13 +742,16 @@ traceon_trigger(struct event_trigger_data *data)
static void
traceon_count_trigger(struct event_trigger_data *data)
{
+ if (tracing_is_on())
+ return;
+
if (!data->count)
return;
if (data->count != -1)
(data->count)--;
- traceon_trigger(data);
+ tracing_on();
}
static void
@@ -763,13 +766,16 @@ traceoff_trigger(struct event_trigger_data *data)
static void
traceoff_count_trigger(struct event_trigger_data *data)
{
+ if (!tracing_is_on())
+ return;
+
if (!data->count)
return;
if (data->count != -1)
(data->count)--;
- traceoff_trigger(data);
+ tracing_off();
}
static int
--
1.8.4.3
next prev parent reply other threads:[~2014-01-10 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 15:20 [for-next][PATCH 0/5] tracing: event trigger updates Steven Rostedt
2014-01-10 15:20 ` [for-next][PATCH 1/5] tracing/kprobes: Add trace event trigger invocations Steven Rostedt
2014-01-10 15:20 ` [for-next][PATCH 2/5] tracing: Remove double-underscore naming in syscall " Steven Rostedt
2014-01-10 15:20 ` Steven Rostedt [this message]
2014-01-10 15:20 ` [for-next][PATCH 4/5] tracing: Consolidate event trigger code Steven Rostedt
2014-01-10 15:20 ` [for-next][PATCH 5/5] tracing: Show available event triggers when no trigger is set Steven Rostedt
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=20140110152100.485765227@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tom.zanussi@linux.intel.com \
/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