From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Arjan van de Ven <arjan@infradead.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 5/5] tracing: make power tracer start/stop methods lighter weight
Date: Tue, 17 Mar 2009 23:14:28 -0400 [thread overview]
Message-ID: <20090318033249.888398770@goodmis.org> (raw)
In-Reply-To: 20090318031423.981603258@goodmis.org
[-- Attachment #1: 0005-tracing-make-power-tracer-start-stop-methods-lighte.patch --]
[-- Type: text/plain, Size: 1238 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The start/stop methods of a tracer should be able to be executed
in all contexts. This patch converts the power tracer to do so.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace_power.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c
index 91ce672..bae791e 100644
--- a/kernel/trace/trace_power.c
+++ b/kernel/trace/trace_power.c
@@ -122,12 +122,16 @@ fail_start:
static void start_power_trace(struct trace_array *tr)
{
trace_power_enabled = 1;
- tracing_power_register();
}
static void stop_power_trace(struct trace_array *tr)
{
trace_power_enabled = 0;
+}
+
+static void power_trace_reset(struct trace_array *tr)
+{
+ trace_power_enabled = 0;
unregister_trace_power_start(probe_power_start);
unregister_trace_power_end(probe_power_end);
unregister_trace_power_mark(probe_power_mark);
@@ -188,7 +192,7 @@ static struct tracer power_tracer __read_mostly =
.init = power_trace_init,
.start = start_power_trace,
.stop = stop_power_trace,
- .reset = stop_power_trace,
+ .reset = power_trace_reset,
.print_line = power_print_line,
};
--
1.6.2
--
next prev parent reply other threads:[~2009-03-18 3:34 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 3:14 [PATCH 0/5] [GIT PULL] updates for tip/tracing/ftrace Steven Rostedt
2009-03-18 3:14 ` [PATCH 1/5] ring-buffer: add api to allow a tracer to change clock source Steven Rostedt
2009-03-18 3:14 ` [PATCH 2/5] tracing: add global-clock option to provide cross CPU clock to traces Steven Rostedt
2009-03-18 3:14 ` [PATCH 3/5] tracing: optimization of branch tracer Steven Rostedt
2009-03-18 3:14 ` [PATCH 4/5] tracing: make sched_switch stop/start light weight Steven Rostedt
2009-03-18 3:14 ` Steven Rostedt [this message]
2009-03-18 5:59 ` [PATCH 0/5] [GIT PULL] updates for tip/tracing/ftrace Ingo Molnar
2009-03-18 7:39 ` Ingo Molnar
2009-03-19 7:33 ` Ingo Molnar
2009-03-19 17:21 ` Steven Rostedt
2009-03-20 17:43 ` Paul E. McKenney
2009-03-20 18:36 ` Ingo Molnar
2009-03-20 18:38 ` Ingo Molnar
2009-03-20 19:19 ` Paul E. McKenney
2009-03-20 19:27 ` Ingo Molnar
2009-03-20 19:41 ` Paul E. McKenney
2009-03-20 19:46 ` Frederic Weisbecker
2009-03-20 19:54 ` Ingo Molnar
2009-03-20 20:48 ` Frederic Weisbecker
2009-03-20 21:05 ` Steven Rostedt
2009-03-21 10:01 ` Ingo Molnar
2009-03-21 16:58 ` Ingo Molnar
2009-03-21 17:25 ` Steven Rostedt
2009-03-21 19:07 ` Paul E. McKenney
2009-03-21 20:09 ` Ingo Molnar
2009-03-21 21:01 ` Paul E. McKenney
2009-03-22 14:24 ` Ingo Molnar
2009-03-22 15:06 ` Ingo Molnar
2009-03-22 17:02 ` Ingo Molnar
2009-03-22 18:33 ` Steven Rostedt
2009-03-22 19:52 ` Ingo Molnar
2009-03-23 18:44 ` Steven Rostedt
2009-03-21 17:32 ` Frederic Weisbecker
2009-03-21 17:44 ` Steven Rostedt
2009-03-21 17:53 ` Frederic Weisbecker
2009-03-21 18:17 ` Steven Rostedt
2009-03-21 20:03 ` Frederic Weisbecker
2009-03-21 18:18 ` Ingo Molnar
2009-03-21 20:09 ` Frederic Weisbecker
2009-03-21 20:46 ` Frederic Weisbecker
2009-03-22 19:41 ` Ingo Molnar
2009-03-22 20:41 ` Ingo Molnar
2009-03-20 21:39 ` Paul E. McKenney
2009-03-20 17:05 ` Frederic Weisbecker
2009-03-20 17:57 ` Frederic Weisbecker
2009-03-20 18:22 ` Steven Rostedt
2009-03-20 18:39 ` Frederic Weisbecker
2009-03-20 18:42 ` Ingo Molnar
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=20090318033249.888398770@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/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