From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] tracing: Register static events output early
Date: Thu, 19 May 2011 01:29:28 +0200 [thread overview]
Message-ID: <1305761368-5488-1-git-send-email-fweisbec@gmail.com> (raw)
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
next reply other threads:[~2011-05-18 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 23:29 Frederic Weisbecker [this message]
2011-05-18 23:37 ` [PATCH] tracing: Register static events output early Steven Rostedt
2011-05-18 23:40 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305761368-5488-1-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox