Compile with -fno-omit-frame-pointer on x86_64?

Jakub Jelinek jakub at redhat.com
Wed Nov 3 18:58:38 UTC 2010


On Wed, Nov 03, 2010 at 02:48:12PM -0400, Owen Taylor wrote:
> Lack of decent profiling is a major problem for making our operating
> system fast. By far the most effective of profiling is sampling profile
> with callgraph information.
> 
> Soeren's comment from March:
> 
>  http://lwn.net/Articles/380582/
> 
> Basically summarizes the situation, and as far as I know nothing has
> changed ... with default compilation options, getting callgraph
> profiling on x86_64 really requires a DWARF unwinder in the kernel.
> Which seems unlikely to happen.

But that's the right thing to do.

> As a developer, your options for profiling are:
> 
>  - Recompile everything you care about profiling 
>    with -fno-omit-frame-pointer instead of using system packages.

Instead of this, which really is a big performance penalty.  Even i?86 is
changing in GCC 4.6 to not do -fno-omit-frame-pointer by default.
The unwind info recent GCCs provide is correct even in epilogues and can be
relied upon.  There are several lightweight unwinders that can be easily
adapted for kernel purposes.  Just talk to the systemtap folks.

There is always callgrind if you don't want to recompile anything and
need to profile something even when kernel doesn't support it.

	Jakub


More information about the devel mailing list