lkml.org 
[lkml]   [2005]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [discuss] [PATCH] allow CONFIG_FRAME_POINTER for x86-64
Date
On Friday 09 September 2005 12:45, Hugh Dickins wrote:
> On Fri, 9 Sep 2005, Jan Beulich wrote:
> > > But why would anyone want frame pointers on x86-64?
> >
> > I'd put the question differently: Why should x86-64 not allow what
> > other architectures do?
> >
> > But of course, I'm not insisting on this patch to get in, it just
> > seemed an obvious inconsistency...
>
> I'm with Jan on this. I use a similar patch for frame pointers on
> x86_64 most of the time, in the hope of getting more accurate backtraces.

It won't give more accurate backtraces, not even on i386 because show_stack
doesn't have any code to follow frame pointers.


> Is x86_64 somehow more likely to give you a less noisy backtrace than
> i386? Fewer of those stale return addresses from earlier trips down
> the stack?

I have a plan to fix this - basically Jan's NLKD has
code to read the unwind information and then do an accurate backtrace
without frame pointers. The plan is to port that code over
(it currently requires too much infrastructure from the debugger
and needs some coding style fixes) and then add something like
CONFIG_RUNTIME_UNWIND_INFO that puts the unwind information into
the running kernel. Then you'll get accurate backtraces without
frame pointers.

The NLKD code would work on i386 too so it could be later enabled
there then too.

IA64 works similar already BTW but the code is not really usable
for other architectures.

> Frame pointers are imperfect on all(?) the supported architectures,
> but I can't see any good reason to exclude them from x86_64. Just a
> couple of weeks ago LKML had a bug where enabling frame pointers on
> x86_64 helped Ingo to pinpoint the origin of the problem.

They are useless because the core kernel doesn't have any code
to follow them. That's true on i386 and on x86-64.

The only reason to use them would be external debuggers, but those
don't need them on x86-64 neither.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-09 13:01    [W:0.438 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site