ftrace: start wakeup tracing after setting function tracer
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 11 Jul 2008 00:58:13 +0000 (20:58 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Jul 2008 13:49:20 +0000 (15:49 +0200)
Enabling the wakeup tracer before enabling the function tracing causes
some strange results due to the dynamic enabling of the functions.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_sched_wakeup.c

index bf7e91caef57d0ae6496688e82530598eab09421..3c8d61df4474adc473b107f04df43028f8efbee6 100644 (file)
@@ -352,9 +352,10 @@ static void start_wakeup_tracer(struct trace_array *tr)
         */
        smp_wmb();
 
-       tracer_enabled = 1;
        register_ftrace_function(&trace_ops);
 
+       tracer_enabled = 1;
+
        return;
 fail_deprobe_wake_new:
        marker_probe_unregister("kernel_sched_wakeup_new",