Re: [PATCH V4 14/16] perf, x86: enable LBR callstack when recording callchain

From: Andi Kleen
Date: Mon Jun 30 2014 - 10:45:23 EST


On Mon, Jun 30, 2014 at 04:50:51PM +0800, Yan, Zheng wrote:
> If a task specific event wants user space callchain but does not want
> branch stack sampling, enable the LBR call stack facility implicitly.
> The LBR call stack facility can help perf to get user space callchain
> in case of there is no frame pointer.
>
> Note: this feature only affects how to get user callchain. The kernel
> callchain is always got by frame pointers.

I'm not sure I like this. If frame pointer works the LBR state saving
is not needed. This would basically always turn it on right?

Perhaps turn it on lazily if the frame pointer resolution fails a few
times.

An explicit switch would be still better.

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