Skip to content

Commit

Permalink
tracing/ftrace: make nop tracer reset previous entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frédéric Weisbecker authored and Ingo Molnar committed Oct 14, 2008
1 parent 8925b39 commit 35cb5ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/trace/trace_nop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 35cb5ed

Please sign in to comment.