[PATCH 5/8] ftrace: start wakeup tracing after setting function tracer

Steven Rostedt
2008-07-11T01:01:09Z

[-- Attachment #1: ftrace-wakeup-enable-tracing-last-on-startup.patch --]
[-- Type: text/plain, Size: 857 bytes --]

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>
---
kernel/trace/trace_sched_wakeup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-tip.git/kernel/trace/trace_sched_wakeup.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace_sched_wakeup.c 2008-07-10 12:19:54.000000000 -0400
+++ linux-tip.git/kernel/trace/trace_sched_wakeup.c 2008-07-10 12:54:09.000000000 -0400
@@ -352,9 +352,10 @@ static void start_wakeup_tracer(struct t
*/
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",

--