public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 1/3] Tracing/ftrace: Make nop tracer reset previous entries
@ 2008-09-21 18:10 Frédéric Weisbecker
  2008-09-22  3:13 ` KOSAKI Motohiro
  0 siblings, 1 reply; 5+ messages in thread
From: Frédéric Weisbecker @ 2008-09-21 18:10 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linux Kernel, Steven Rostedt, Steven Noonan

If nop tracer is selected, some old entries from the previous tracer could still be enqueued. Tracing have to be reset.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
diff -rup linux-2.6-tip (2)/kernel/trace/trace_nop.c linux-2.6-tip/kernel/trace/trace_nop.c
--- linux-2.6-tip (2)/kernel/trace/trace_nop.c	2008-09-19 18:01:26.000000000 +0200
+++ linux-2.6-tip/kernel/trace/trace_nop.c	2008-09-21 00:44:47.000000000 +0200
@@ -25,8 +25,12 @@ static void stop_nop_trace(struct trace_
 }

 

 static void nop_trace_init(struct trace_array *tr)

-{

-	ctx_trace = tr;

+{
+	int cpu;

+	ctx_trace = tr;
+
+	for_each_online_cpu(cpu)

+		tracing_reset(tr->data[cpu]);

 

 	if (tr->ctrl)

 		start_nop_trace(tr);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-22 12:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-21 18:10 [Patch 1/3] Tracing/ftrace: Make nop tracer reset previous entries Frédéric Weisbecker
2008-09-22  3:13 ` KOSAKI Motohiro
2008-09-22  9:36   ` Ingo Molnar
2008-09-22 12:06     ` Frédéric Weisbecker
2008-09-22 12:10       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox