public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 1/4] trace: print ftrace_dump at KERN_EMERG log level
Date: Wed, 14 Jan 2009 19:02:55 -0500	[thread overview]
Message-ID: <20090115000332.170230237@goodmis.org> (raw)
In-Reply-To: 20090115000254.519563275@goodmis.org

[-- Attachment #1: 0001-trace-print-ftrace_dump-at-KERN_EMERG-log-level.patch --]
[-- Type: text/plain, Size: 1290 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Impact: fix to print out ftrace_dump when expected

I was debugging a hard race condition to only find out that
after I hit the race, my log level was not at level to show
KERN_INFO. The time it took to trigger the race was wasted because
I did not capture the trace.

Since ftrace_dump is only called from kernel oops (and only when
it is set in the kernel command line to do so), or when a
developer adds it to their own local tree, the log level of
the print should be at KERN_EMERG to make sure the print appears.

ftrace_dump is not called by a normal user setup, and will not
add extra unwanted print out to the console. There is no reason
it should be at KERN_INFO.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 40217fb..408c03f 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3076,7 +3076,7 @@ static struct notifier_block trace_die_notifier = {
  * it if we decide to change what log level the ftrace dump
  * should be at.
  */
-#define KERN_TRACE		KERN_INFO
+#define KERN_TRACE		KERN_EMERG
 
 static void
 trace_printk_seq(struct trace_seq *s)
-- 
1.5.6.5

-- 

  reply	other threads:[~2009-01-15  0:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15  0:02 [PATCH 0/4] ftrace: updates to tip Steven Rostedt
2009-01-15  0:02 ` Steven Rostedt [this message]
2009-01-15  0:02 ` [PATCH 2/4] ring_buffer: reset write when reserve buffer fail Steven Rostedt
2009-01-15  0:02 ` [PATCH 3/4] trace: stop all recording to ring buffer on ftrace_dump Steven Rostedt
2009-01-15  0:02 ` [PATCH 4/4] tracing/function-graph-tracer: fix a regression while suspend to disk Steven Rostedt
2009-01-15  8:46 ` [PATCH 0/4] ftrace: updates to tip Ingo Molnar

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=20090115000332.170230237@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.com \
    /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