Re: [PATCH v3 00/14] perf, x86: Haswell LBR call stack support

From: Andy Lutomirski
Date: Wed Feb 26 2014 - 15:27:16 EST


On Wed, Feb 26, 2014 at 12:14 PM, David Ahern <dsahern@xxxxxxxxx> wrote:
> On 2/26/14, 12:25 PM, Andy Lutomirski wrote:
>>
>> On Wed, Feb 26, 2014 at 11:19 AM, David Ahern <dsahern@xxxxxxxxx> wrote:
>>>
>>> On 2/26/14, 11:59 AM, Andy Lutomirski wrote:
>>>
>>>> I wonder if anyone who uses perf for userspace profiling *ever* uses
>>>> FP and gets away with it. There's precious little userspace software
>>>> compiled with frame pointers these days on most architectures.
>>>
>>>
>>>
>>> yes and yes. With control over the entire stack we are making sure
>>> frame-pointers are enabled as much as possible.
>>>
>>
>> I'm curious why.
>
>
> Is there some reason not to enable frame pointers?

Speed. FPO saves one register (a big deal on x86_32; not so important
on x86_64) but also saves a few cycles on function entry and exit,
which is a bigger deal for small functions.

>
> fp method has much less overhead than dwarf, and good, clear callchains are
> important.
>

Agreed about the good, clear callchains. But DWARF seems to work
pretty well, and you only have the overhead when you're actually
debugging or profiling.

>
>>
>> Maybe this should be a config option. Anyone using a standard distro
>> is running a nearly completely frame-pointer-omitted userspace these
>> days.
>
>
> Does WRL or Yocto fall into that 'standard distro' comment? Fairly easy to
> enable frame-pointers.

Fair enough :)

--Andy
--
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/