Skip to content

Commit

Permalink
tracing/ftrace: fix a bug when switch current tracer to sched tracer
Browse files Browse the repository at this point in the history
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: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Nov 4, 2008
1 parent efade6e commit 79a9d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/trace_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion kernel/trace/trace_sched_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 79a9d46

Please sign in to comment.