]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tracing/ftrace: fix a bug when switch current tracer to sched tracer
authorFrederic Weisbecker <fweisbec@gmail.com>
Fri, 31 Oct 2008 12:34:45 +0000 (13:34 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 4 Nov 2008 16:14:08 +0000 (17:14 +0100)
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>
kernel/trace/trace_boot.c
kernel/trace/trace_sched_switch.c

index 6bbc8794a6df3d7cfe2074d3f3bf1a7485cd64d7..bd5046c9deb7cbcda1bf16e5ffd0ba78b9ec3bd1 100644 (file)
@@ -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)
index 969953bf678fdabf88a50cf9479fcef318007de6..888944d3409d5718bd7f22a6575ce121aa3332f8 100644 (file)
@@ -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);
 }