The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [Patch -tip 2/4] Tracing/ftrace: Make tracing suitable to run the initcall tracer
@ 2008-09-23 10:34 Frédéric Weisbecker
  0 siblings, 0 replies; only message in thread
From: Frédéric Weisbecker @ 2008-09-23 10:34 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel, Steven Rostedt, Steven Noonan,
	Arjan van de Ven

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

The tracing engine have now to be init in early_initcall to set the initcall tracer.
Only the debugfs settings will be initialized at fs_initcall time.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---

[-- Attachment #2: patch2.diff --]
[-- Type: text/plain, Size: 1533 bytes --]

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f2ef72f..16f1409 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,12 +3505,16 @@ __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_INITCALL_TRACER
+	register_tracer(&initcall_tracer);
+	current_trace = &initcall_tracer;
+	current_trace->init(&global_trace);
+#else
 	current_trace = &nop_trace;
+#endif
 
 	/* All seems OK, enable tracing */
 	global_trace.ctrl = tracer_enabled;
@@ -3519,7 +3524,6 @@ __init static int tracer_alloc_buffers(void)
 				       &trace_panic_notifier);
 
 	register_die_notifier(&trace_die_notifier);
-
 	return 0;
 
  free_buffers:
@@ -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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-23  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 10:34 [Patch -tip 2/4] Tracing/ftrace: Make tracing suitable to run the initcall tracer Frédéric Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox