linux-mips
[Top] [All Lists]

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

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH 6/7] Fix dump_stack()
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Tue, 01 Aug 2006 17:36:38 +0200
Cc: vagabon.xyz@gmail.com, ralf@linux-mips.org, linux-mips@linux-mips.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=sqfI4jGfmo6rqLPjAE9yv0pBuQqJWNwCsT1sZfnZ1H13gujjUnEvKcmXtkXLbJpaHl5CCKqfouDMO0s7aedUQ5d3EztheKC6Cm3gqgvBvsDrytWElNTkQiWNWg3SAQFADTC1XVEmEs727A6FAgIiaCjvJP0C1LCJunmEt8/fQXk=
In-reply-to: <20060802.000837.37531064.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <11544244373398-git-send-email-vagabon.xyz@gmail.com> <1154424439852-git-send-email-vagabon.xyz@gmail.com> <20060802.000837.37531064.anemo@mba.ocn.ne.jp>
Reply-to: Franck <vagabon.xyz@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Atsushi Nemoto wrote:
> On Tue,  1 Aug 2006 11:27:16 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
> wrote:
>> When CONFIG_KALLSYMS is not set stack local is not initialized. Therefore
>> show_trace() won't display anything useful. This patch uses
>> prepare_frametrace() to setup the stack pointer before calling
>> show_trace().
> 
> It's not a bug.  The original show_trace() needs an address on stack
> and dump_stack() surely give it by taking an address of local
> variable.
> 

sorry, was drunk when writing the commit message...

> 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()...

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.

                Franck

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