public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Steven Noonan <steven@uplinklabs.net>
Subject: [Patch 1/3] Tracing/ftrace: Make nop tracer reset previous entries
Date: Sun, 21 Sep 2008 20:10:14 +0200	[thread overview]
Message-ID: <48D68E06.50504@gmail.com> (raw)

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);

             reply	other threads:[~2008-09-21 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-21 18:10 Frédéric Weisbecker [this message]
2008-09-22  3:13 ` [Patch 1/3] Tracing/ftrace: Make nop tracer reset previous entries 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

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=48D68E06.50504@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=steven@uplinklabs.net \
    /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