Commit 79a9d461 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

tracing/ftrace: fix a bug when switch current tracer to sched tracer

Impact: fix boot tracer + sched tracer coupling bug

Fix a bug that made the sched_switch tracer unable to run
if set as the current_tracer after the boot tracer.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent efade6e7
......@@ -37,9 +37,9 @@ void disable_boot_trace(void)
tracing_stop_cmdline_record();
}
void reset_boot_trace(struct trace_array *tr)
static void reset_boot_trace(struct trace_array *tr)
{
disable_boot_trace();
sched_switch_trace.reset(tr);
}
static void boot_trace_init(struct trace_array *tr)
......
......@@ -173,7 +173,7 @@ static void sched_switch_trace_init(struct trace_array *tr)
static void sched_switch_trace_reset(struct trace_array *tr)
{
if (tr->ctrl)
if (tr->ctrl && sched_ref)
stop_sched_trace(tr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment