On Wed, Aug 13, 2008 at 04:00:37PM -0400, Steven Rostedt wrote:
Not without patching gcc. Try it. The patch is not very difficult and i did
it here, but it needs a patch.
Actually you can get the parent without frame pointer if you just
force gcc to emit mcount before touching the stack frame (and manual
insertion pass would do that). Then parent is at 4(%esp)/8(%rsp)
Again teaching gcc that is not very difficult, but it needs a patch.
Nope.
First that's not true (remember most production kernels run
without frame pointers, also e.g. crash or systemtap know how to do proper
unwinding without slow frame pointers) and if you want it runtime also you
can always add the dwarf2 unwinder (like the opensuse kernel does) and get
better backtraces than you could ever get with frame pointers (that is
because e.g. most assembler code doesn't even bother to set up frame
pointers, but it is all dwarf2 annotated)
Also I must say the whole ftrace noping exercise is pretty pointless without
avoiding frame pointers because it does save less than what you lose
unconditionally from the "select FRAME_POINTER"
-Andi
--