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
|