linux-mips
[Top] [All Lists]

Re: [PATCH 6/7] Fix dump_stack()

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH 6/7] Fix dump_stack()
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Wed, 02 Aug 2006 01:05:22 +0900 (JST)
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
In-reply-to: <44CF7506.70106@innova-card.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1154424439852-git-send-email-vagabon.xyz@gmail.com> <20060802.000837.37531064.anemo@mba.ocn.ne.jp> <44CF7506.70106@innova-card.com>
Sender: linux-mips-bounce@linux-mips.org
On Tue, 01 Aug 2006 17:36:38 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
wrote:
> > Eliminating the #ifdef itself looks good, but if you cleared contents
> > of the "regs" before prepare_frametrace, you will get less false
> > entries in the output.
> 
> well I don't see why...show_trace() is going to only use regs[29] which
> is setup by prepare_frametrace()...

If CONFIG_KALLSYMS was not set, show_trace() print all possible
entries starting from the sp.  The sp value stored in "regs" by
prepare_frametrace() will be little smaller one than the address of
the "regs" itself.  So if some values like function addresses were in
the "regs", show_trace() will report them.

> One other thing, why did you mark prepare_frametrace() as noinline ?
> I would mark it as always_inline to get one less false entry in the
> output.

Well, I tried some prepare_frametrace() implementations before the
final one.  I wanted to make sure that prepare_frametrace() does
really what desired, and noinline make it a bit easy.

But now I think current prepare_frametrace() is quite safe for
inlining.  So always_inline would be OK.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>