[PATCH v2 6/7] perf, x86: Use LBR call stack to get user callchain

2013-07-01 Thread Yan, Zheng
From: "Yan, Zheng" Try enabling the LBR call stack feature if event request recording callchain. Try utilizing the LBR call stack to get user callchain in case of there is no frame pointer. This patch also adds a cpu pmu attribute to enable/disable this feature. Signed-off-by: Yan, Zheng ---

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Andi Kleen
> But isn't the whole point of the patch to hide LBR cstack from users so they > won't know they're using it for user cstack? The point of the patch is to get user backtraces where you can't get them today. > > To disable it in sysfs, I need to know it's being used in the first place. You can a

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Yan, Zheng
On 10/24/2012 08:36 PM, Stephane Eranian wrote: > On Wed, Oct 24, 2012 at 2:31 PM, Andi Kleen wrote: >> On Wed, Oct 24, 2012 at 02:21:43PM +0200, Stephane Eranian wrote: >>> But still, if I do: >>> $ perf record -g -e cpu/cycles/k >>> >>> Looks like your code will activate LBR cstack for

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Stephane Eranian
On Wed, Oct 24, 2012 at 2:31 PM, Andi Kleen wrote: > On Wed, Oct 24, 2012 at 02:21:43PM +0200, Stephane Eranian wrote: >> But still, if I do: >> $ perf record -g -e cpu/cycles/k >> >> Looks like your code will activate LBR cstack for user stack even >> though I don't use it. >> I know it

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Andi Kleen
On Wed, Oct 24, 2012 at 02:21:43PM +0200, Stephane Eranian wrote: > But still, if I do: > $ perf record -g -e cpu/cycles/k > > Looks like your code will activate LBR cstack for user stack even > though I don't use it. > I know it won't generate any user samples (theoretically) but you ar

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Stephane Eranian
But still, if I do: $ perf record -g -e cpu/cycles/k Looks like your code will activate LBR cstack for user stack even though I don't use it. I know it won't generate any user samples (theoretically) but you are still commandeering the LBR resource which other events may want to use. On

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Stephane Eranian
On Wed, Oct 24, 2012 at 1:52 PM, Yan, Zheng wrote: > On 10/24/2012 07:47 PM, Stephane Eranian wrote: >> On Wed, Oct 24, 2012 at 1:23 PM, Yan, Zheng wrote: >>> On 10/24/2012 04:57 PM, Stephane Eranian wrote: On Wed, Oct 24, 2012 at 7:59 AM, Yan, Zheng wrote: > From: "Yan, Zheng" > >

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Yan, Zheng
On 10/24/2012 07:47 PM, Stephane Eranian wrote: > On Wed, Oct 24, 2012 at 1:23 PM, Yan, Zheng wrote: >> On 10/24/2012 04:57 PM, Stephane Eranian wrote: >>> On Wed, Oct 24, 2012 at 7:59 AM, Yan, Zheng wrote: From: "Yan, Zheng" Try enabling the LBR call stack feature if event reques

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Stephane Eranian
On Wed, Oct 24, 2012 at 1:23 PM, Yan, Zheng wrote: > On 10/24/2012 04:57 PM, Stephane Eranian wrote: >> On Wed, Oct 24, 2012 at 7:59 AM, Yan, Zheng wrote: >>> From: "Yan, Zheng" >>> >>> Try enabling the LBR call stack feature if event request recording >>> callchain. Try utilizing the LBR call s

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Yan, Zheng
On 10/24/2012 04:57 PM, Stephane Eranian wrote: > On Wed, Oct 24, 2012 at 7:59 AM, Yan, Zheng wrote: >> From: "Yan, Zheng" >> >> Try enabling the LBR call stack feature if event request recording >> callchain. Try utilizing the LBR call stack to get user callchain >> in case of there is no frame

Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-24 Thread Stephane Eranian
On Wed, Oct 24, 2012 at 7:59 AM, Yan, Zheng wrote: > From: "Yan, Zheng" > > Try enabling the LBR call stack feature if event request recording > callchain. Try utilizing the LBR call stack to get user callchain > in case of there is no frame pointer. > > Signed-off-by: Yan, Zheng > --- > arch/x

[PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain

2012-10-23 Thread Yan, Zheng
From: "Yan, Zheng" Try enabling the LBR call stack feature if event request recording callchain. Try utilizing the LBR call stack to get user callchain in case of there is no frame pointer. Signed-off-by: Yan, Zheng --- arch/x86/kernel/cpu/perf_event.c | 126 +