Re: [patch 2/2] Use the stack frames to get exact stack-traces for CONFIG_FRAMEPOINTER on x86-64

From: Andi Kleen
Date: Tue Jan 08 2008 - 12:01:59 EST


Arjan van de Ven <arjan@xxxxxxxxxxxxx> writes:

> Subject: Use the stack frames to get exact stack-traces for CONFIG_FRAMEPOINTER on x86-64
> From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
>
> x86 32 bit already has this feature: This patch uses the stack frames with

You would also need to add frame pointers to all .S functions, otherwise
it will stop there.

> frame pointer into an exact stack trace, by following the frame pointer.
> This only affects kernels built with the CONFIG_FRAME_POINTER config option
> enabled, and greatly reduces the amount of noise in oopses.

Well it's still the wrong way to do this. The correct way is to reintegrate
Jan's dwarf2 unwinder. Incidentially that code supports frame pointer
unwinding too, but of course with the same limits as described above.

> The code tries to use the frame pointers to do a backtrace, but if it smells
> iffy or invalid, falls back to the traditional way of printing backtraces,
> to make sure that at least some useful backtrace is created.

That will likely happen in most non trivial cases (interrupts/exceptions etc.)

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