The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] tracing: Register static events output early
@ 2011-05-18 23:29 Frederic Weisbecker
  2011-05-18 23:37 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Frederic Weisbecker @ 2011-05-18 23:29 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Frederic Weisbecker, Ingo Molnar

Early uses of trace_printk() or trace_dump_stack() won't be
displayed correctly if they are printed before device initcalls
through explicit calls to ftrace_dump() or if there is an early
BUG() and ftrace_dump_on_oops is set. This is because we only
initialize these static events output callbacks at that initcall
level.

Initialize these events output at the earliest initcall state
to make boot debugging possible sooner.

Before:

[    1.936168] Dumping ftrace buffer:
[    1.936168] ---------------------------------
[    1.936168]   <idle>-0       3d.s. 2299861us : Unknown type 4
[    1.936168] ---------------------------------

After:

[    1.946182] Dumping ftrace buffer:
[    1.946182] ---------------------------------
[    1.946182]   <idle>-0       3d.s. 2309844us : <stack trace>
[    1.946182]  => tick_setup_sched_timer
[    1.946182]  => hrtimer_run_pending
[    1.946182]  => run_timer_softirq
[    1.946182]  => __do_softirq
[    1.946182]  => call_softirq
[    1.946182]  => do_softirq
[    1.946182]  => irq_exit
[    1.946182]  => smp_apic_timer_interrupt
[    1.946182] ---------------------------------

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
 kernel/trace/trace_output.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index cf535cc..ad92d9c 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -1278,4 +1278,4 @@ __init static int init_events(void)
 
 	return 0;
 }
-device_initcall(init_events);
+early_initcall(init_events);
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-18 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-18 23:29 [PATCH] tracing: Register static events output early Frederic Weisbecker
2011-05-18 23:37 ` Steven Rostedt
2011-05-18 23:40   ` Frederic Weisbecker

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