Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-23 Thread Andi Kleen
> > You add an ABI sample type without mentioning it in your changelog.. I > > think I'll stop reading here. > > > Ok, I will add the ABI change to the change log. Do you think we should hide > this > branch sample type from user? Yes I would hide it. No need to expose, except as a callstack. -

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-23 Thread Stephane Eranian
On Tue, Oct 23, 2012 at 7:41 AM, Yan, Zheng wrote: > On 10/22/2012 06:35 PM, Peter Zijlstra wrote: >> On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: >>> --- a/include/uapi/linux/perf_event.h >>> +++ b/include/uapi/linux/perf_event.h >>> @@ -160,8 +160,9 @@ enum perf_branch_sample_type { >>>

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-23 Thread Peter Zijlstra
On Tue, 2012-10-23 at 13:41 +0800, Yan, Zheng wrote: > On 10/22/2012 06:35 PM, Peter Zijlstra wrote: > > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > >> --- a/include/uapi/linux/perf_event.h > >> +++ b/include/uapi/linux/perf_event.h > >> @@ -160,8 +160,9 @@ enum perf_branch_sample_type {

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Yan, Zheng
On 10/22/2012 06:35 PM, Peter Zijlstra wrote: > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: >> --- a/include/uapi/linux/perf_event.h >> +++ b/include/uapi/linux/perf_event.h >> @@ -160,8 +160,9 @@ enum perf_branch_sample_type { >> PERF_SAMPLE_BRANCH_ABORT= 1U << 7, /* trans

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Yan, Zheng
On 10/22/2012 07:23 PM, Stephane Eranian wrote: > On Mon, Oct 22, 2012 at 12:33 PM, Peter Zijlstra > wrote: >> >> On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: >>> + /* LBR callstack does not work well with FREEZE_LBRS_ON_PMI */ >>> + if (!cpuc->lbr_sel || !(cpuc->lbr_sel->conf

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Yan, Zheng
On 10/22/2012 06:33 PM, Peter Zijlstra wrote: > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: >> + /* LBR callstack does not work well with FREEZE_LBRS_ON_PMI */ >> + if (!cpuc->lbr_sel || !(cpuc->lbr_sel->config & LBR_CALL_STACK)) >> + debugctl |= DEBUGCTLMSR_FREEZ

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Andi Kleen
On Mon, Oct 22, 2012 at 12:35:38PM +0200, Peter Zijlstra wrote: > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > > --- a/include/uapi/linux/perf_event.h > > +++ b/include/uapi/linux/perf_event.h > > @@ -160,8 +160,9 @@ enum perf_branch_sample_type { > > PERF_SAMPLE_BRANCH_ABORT

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Andi Kleen
On Mon, Oct 22, 2012 at 12:33:36PM +0200, Peter Zijlstra wrote: > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > > + /* LBR callstack does not work well with FREEZE_LBRS_ON_PMI */ > > + if (!cpuc->lbr_sel || !(cpuc->lbr_sel->config & LBR_CALL_STACK)) > > + debugctl

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Stephane Eranian
On Mon, Oct 22, 2012 at 12:33 PM, Peter Zijlstra wrote: > > On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > > + /* LBR callstack does not work well with FREEZE_LBRS_ON_PMI */ > > + if (!cpuc->lbr_sel || !(cpuc->lbr_sel->config & LBR_CALL_STACK)) > > + debugctl |= D

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Peter Zijlstra
On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -160,8 +160,9 @@ enum perf_branch_sample_type { > PERF_SAMPLE_BRANCH_ABORT= 1U << 7, /* transaction aborts */ > PERF_SAMPLE_BRANCH_INTX

Re: [PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-22 Thread Peter Zijlstra
On Mon, 2012-10-22 at 14:11 +0800, Yan, Zheng wrote: > + /* LBR callstack does not work well with FREEZE_LBRS_ON_PMI */ > + if (!cpuc->lbr_sel || !(cpuc->lbr_sel->config & LBR_CALL_STACK)) > + debugctl |= DEBUGCTLMSR_FREEZE_LBRS_ON_PMI; How useful it is without this? How

[PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-21 Thread Yan, Zheng
From: "Yan, Zheng" The new HSW call stack feature provides a facility such that unfiltered call data will be collected as normal, but as return instructions are executed the last captured branch record is popped from the LBR stack. Thus, branch information relative to leaf functions will not be c

[PATCH 1/6] perf, x86: Basic Haswell LBR call stack support

2012-10-21 Thread Yan, Zheng
From: "Yan, Zheng" The new HSW call stack feature provides a facility such that unfiltered call data will be collected as normal, but as return instructions are executed the last captured branch record is popped from the LBR stack. Thus, branch information relative to leaf functions will not be c