mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Simon Glass <sjg@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH] ARM: Adjust backtrace messages to line up with x86 kernel
Date: Tue, 17 Jan 2012 20:24:32 +0000	[thread overview]
Message-ID: <20120117202432.GW1068@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1326831362-28703-1-git-send-email-sjg@chromium.org>

On Tue, Jan 17, 2012 at 12:16:01PM -0800, Simon Glass wrote:
> It is nice to print the backtrace message on its own line, and also
> regardless of the setting of CONFIG_ARM_UNWIND. This means that tools
> which parse the backtrace don't need a special case for the first line.
> It also makes it more like the x86 kernel output.
> 
> I believe we should also put KERN_EMERG at the start of this. Otherwise
> it won't appear in console output (although it will appear in the logs
> after a reboot).
> 
> The impact of this change is that the log output changes from something
> like:
> 
> [    2.861692] 7fe0: 01beb1b8 befcb7d4 0000aebb 40284334 80000010 01be4668 00000000 00000000
> [    2.869866] Backtrace: [<c00bb3f4>] (module_put+0x44/0xc0) from [<c00bdd98>] (sys_init_module+0x186c/0x19c4)

You should not be getting it like this; I've never seen an oops dump
containing stuff formatted in this way on ARM.

If you care to look at the code, you'll notice that we have:

        printk("Backtrace: ");
...
	if () {
                printk("no frame pointer");
	} else if () {
                printk("invalid frame pointer 0x%08x", fp);
	} else if ()
                printk("frame pointer underflow");
	printk("\n");

	if (ok)
		c_backtrace();

So, by adding the '\n' at the end of the first printk, not only will you
add an additional blank line to the backtrace, but also move those
backtrace warning messages onto their own line, further pushing up the
number of lines an oops dump produces.

However, the lack of "Backtrace:" with ARM_UNWIND set needs fixing -
but please look at the unwind_backtrace() function first, and notice
that it contains its own version of this message (using __func__
instead - which is probably a bad idea.)  That needs fixing too.

  reply	other threads:[~2012-01-17 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 20:16 Simon Glass
2012-01-17 20:24 ` Russell King - ARM Linux [this message]
2012-01-18  7:01   ` Simon Glass
2012-01-18  7:03 ` [PATCH v2] " Simon Glass

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=20120117202432.GW1068@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sjg@chromium.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

all inboxes | Powered by JetHome®