From: Ingo Molnar <mingo@elte.hu>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
akpm@linux-foundation.org, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] scripts: script from kerneloops.org to pretty print oops dumps
Date: Wed, 26 Nov 2008 08:24:45 +0100 [thread overview]
Message-ID: <20081126072445.GG26036@elte.hu> (raw)
In-Reply-To: <20081123130042.1d194768@infradead.org>
* Arjan van de Ven <arjan@infradead.org> wrote:
> From 57b0deb1ad706a94e3118baee4127676f465c4ab Mon Sep 17 00:00:00 2001
> From: Arjan van de Ven <arjan@linux.intel.com>
> Date: Wed, 5 Nov 2008 19:00:36 -0800
> Subject: [PATCH] scripts: script from kerneloops.org to pretty print oops dumps
>
> We're strugling all the time to figure out where the code came from
> that oopsed.. The script below (a adaption from a script used by kerneloops.org)
> can help developers quite a bit, at least for non-module cases.
>
> It works and looks like this:
>
> [/home/arjan/linux]$ dmesg | perl scripts/markup_oops.pl vmlinux
> {
> struct agp_memory *memory;
>
> memory = agp_allocate_memory(agp_bridge, pg_count, type);
> c055c10f: 89 c2 mov %eax,%edx
> if (memory == NULL)
> c055c111: 74 19 je c055c12c <agp_allocate_memory_wrap+0x30>
> /* This function must only be called when current_controller != NULL */
> static void agp_insert_into_pool(struct agp_memory * temp)
> {
> struct agp_memory *prev;
>
> prev = agp_fe.current_controller->pool;
> c055c113: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
> *c055c118: 8b 40 10 mov 0x10(%eax),%eax <----- faulting instruction
>
> if (prev != NULL) {
> c055c11b: 85 c0 test %eax,%eax
> c055c11d: 74 05 je c055c124 <agp_allocate_memory_wrap+0x28>
> prev->prev = temp;
> c055c11f: 89 50 04 mov %edx,0x4(%eax)
> temp->next = prev;
> c055c122: 89 02 mov %eax,(%edx)
> }
> agp_fe.current_controller->pool = temp;
> c055c124: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
> c055c129: 89 50 10 mov %edx,0x10(%eax)
> if (memory == NULL)
> return NULL;
>
> agp_insert_into_pool(memory);
>
> so in this case, we faulted while dereferencing agp_fe.current_controller pointer, and we get to see
> exactly which function and line it affects... Personally I find this very useful, and I can
> see value for having this script in the kernel for more-than-just-me to use.
>
> Caveats:
> * It only works for oopses not-in-modules
> * It only works nicely for kernels compiled with CONFIG_DEBUG_INFO
> * It's not very fast.
> * It only works on x86
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> ---
> scripts/markup_oops.pl | 162 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 162 insertions(+), 0 deletions(-)
> create mode 100644 scripts/markup_oops.pl
looks useful - Andrew, Sam, any objections to this?
Ingo
next prev parent reply other threads:[~2008-11-26 7:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 21:00 Arjan van de Ven
2008-11-26 7:24 ` Ingo Molnar [this message]
2008-11-26 8:12 ` Andrew Morton
2008-11-26 8:27 ` Ingo Molnar
2008-11-26 14:09 ` Andi Kleen
2008-11-26 8:18 ` Vegard Nossum
2008-11-26 14:49 ` Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2008-11-06 3:07 Arjan van de Ven
2008-11-06 4:15 ` Keith Owens
2008-11-06 5:36 ` Arjan van de Ven
2008-11-06 10:29 ` Américo Wang
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=20081126072445.GG26036@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=x86@kernel.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®