summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorFrédéric Weisbecker <fweisbec@gmail.com>2008-09-23 11:34:32 +0100
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:38:48 +0200
commitb5ad384e79add1d87fff54070000dadcf218ffab (patch)
tree002ce9397b13197b248c5b061bdb8728a58092c4 /kernel
parentd13744cd6e3fef373a3fe656ac349b4e7c49ff79 (diff)
downloadlinux-b5ad384e79add1d87fff54070000dadcf218ffab.tar.gz
linux-b5ad384e79add1d87fff54070000dadcf218ffab.tar.bz2
linux-b5ad384e79add1d87fff54070000dadcf218ffab.zip
tracing/ftrace: make tracing suitable to run the boot tracer
The tracing engine have now to be init in early_initcall to set the boot tracer. Only the debugfs settings will be initialized at fs_initcall time. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f2ef72fa3f17..6ada059832a6 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2990,7 +2990,7 @@ struct dentry *tracing_init_dentry(void)
#include "trace_selftest.c"
#endif
-static __init void tracer_init_debugfs(void)
+static __init int tracer_init_debugfs(void)
{
struct dentry *d_tracer;
struct dentry *entry;
@@ -3078,6 +3078,7 @@ static __init void tracer_init_debugfs(void)
#ifdef CONFIG_SYSPROF_TRACER
init_tracer_sysprof_debugfs(d_tracer);
#endif
+ return 0;
}
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
@@ -3504,17 +3505,20 @@ __init static int tracer_alloc_buffers(void)
pages, trace_nr_entries, (long)TRACE_ENTRY_SIZE);
pr_info(" actual entries %ld\n", global_trace.entries);
- tracer_init_debugfs();
-
trace_init_cmdlines();
register_tracer(&nop_trace);
+#ifdef CONFIG_BOOT_TRACER
+ register_tracer(&boot_tracer);
+ current_trace = &boot_tracer;
+ current_trace->init(&global_trace);
+#else
current_trace = &nop_trace;
+#endif
/* All seems OK, enable tracing */
global_trace.ctrl = tracer_enabled;
tracing_disabled = 0;
-
atomic_notifier_chain_register(&panic_notifier_list,
&trace_panic_notifier);
@@ -3548,4 +3552,5 @@ __init static int tracer_alloc_buffers(void)
}
return ret;
}
-fs_initcall(tracer_alloc_buffers);
+early_initcall(tracer_alloc_buffers);
+fs_initcall(tracer_init_debugfs);