On Wed, Apr 24, 2013 at 12:58 AM, Sriraman Tallam wrote:
> Hi,
>
>   This patch generates labels for cold function parts that are split when
> using the option -freorder-blocks-and-partition.  The cold label name
> is generated by suffixing ".cold" to the assembler name of the hot
> function.
>
>   This is useful when getting back traces from gdb when the cold function
> part does get executed.

Can you show how this changes your gdb back traces? Can you not
already let GDB inform you that it's in another .text section?

I don't like this label idea much. It seems so arbitrary, unless
you're only interested in knowing when a piece of function from
another .text section is executed. But I'm personally more interested
in the whole function, i.e. also in not-so-hot (or even cold) blocks
that are not in the .text.unlikely section. That means somehow passing
the profile-use information from the compiler to the debugger.

So what I would really like to have instead, is some kind of DWARF
annotations for profile information in the function, with some way in
GDB to inspect and modify the values, and to add break points based on
execution count threshold.

I haven't really thought this through yet, but I have this dream of
having the data of a gcno file encoded in DWARF instead, and to have
profile information included in the FDO-compiled binary to add the
ability to verify that those parts of the program that you expect to
be hot are really also considered hot by the compiler. The only way to
check this now is by inspecting some dumps and that's IMHO not very
practical.

Ciao!
Steven

Reply via email to