tracing/ftrace: make nop tracer reset previous entries
authorFrédéric Weisbecker <fweisbec@gmail.com>
Sun, 21 Sep 2008 18:10:14 +0000 (20:10 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:38:04 +0000 (10:38 +0200)
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>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_nop.c

index dafaefb8403868bf1d624f57f5f9f4ec0096a18f..9fb02c17ad0c73bf33d0af8b48c6ce69f6a51c63 100644 (file)
@@ -26,8 +26,12 @@ static void stop_nop_trace(struct trace_array *tr)
 
 static void nop_trace_init(struct trace_array *tr)
 {
+       int cpu;
        ctx_trace = tr;
 
+       for_each_online_cpu(cpu)
+               tracing_reset(tr->data[cpu]);
+
        if (tr->ctrl)
                start_nop_trace(tr);
 }