Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-28 Thread Liang, Kan
On 7/28/2020 9:44 AM, pet...@infradead.org wrote: On Tue, Jul 28, 2020 at 09:28:39AM -0400, Liang, Kan wrote: On 7/28/2020 9:09 AM, Peter Zijlstra wrote: On Fri, Jul 24, 2020 at 03:10:52PM -0400, Liang, Kan wrote: diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c i

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-28 Thread peterz
On Tue, Jul 28, 2020 at 09:28:39AM -0400, Liang, Kan wrote: > > > On 7/28/2020 9:09 AM, Peter Zijlstra wrote: > > On Fri, Jul 24, 2020 at 03:10:52PM -0400, Liang, Kan wrote: > > > > > diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c > > > index 6cb079e0c9d9..010ac74afc09

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-28 Thread Liang, Kan
On 7/28/2020 9:09 AM, Peter Zijlstra wrote: On Fri, Jul 24, 2020 at 03:10:52PM -0400, Liang, Kan wrote: diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 6cb079e0c9d9..010ac74afc09 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -2

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-28 Thread Peter Zijlstra
On Fri, Jul 24, 2020 at 03:10:52PM -0400, Liang, Kan wrote: > diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c > index 6cb079e0c9d9..010ac74afc09 100644 > --- a/arch/x86/events/intel/core.c > +++ b/arch/x86/events/intel/core.c > @@ -2405,27 +2405,18 @@ static u64 icl_update

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-28 Thread Peter Zijlstra
On Fri, Jul 24, 2020 at 03:10:52PM -0400, Liang, Kan wrote: > > > > Per the SIBLING patch this then wants to be: > > > > > > > >     if (!is_slots_event(leader)) > > > >     return -EINVAL; > > > > > > > >     event->event_caps |= PERF_EV_CAP_SIBLING. > > > >

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-24 Thread Liang, Kan
On 7/24/2020 12:07 PM, Liang, Kan wrote: On 7/24/2020 11:27 AM, pet...@infradead.org wrote: On Fri, Jul 24, 2020 at 03:19:06PM +0200, pet...@infradead.org wrote: On Thu, Jul 23, 2020 at 10:11:11AM -0700, kan.li...@linux.intel.com wrote: @@ -3375,6 +3428,72 @@ static int intel_pmu_hw_config

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-24 Thread Liang, Kan
On 7/24/2020 11:27 AM, pet...@infradead.org wrote: On Fri, Jul 24, 2020 at 03:19:06PM +0200, pet...@infradead.org wrote: On Thu, Jul 23, 2020 at 10:11:11AM -0700, kan.li...@linux.intel.com wrote: @@ -3375,6 +3428,72 @@ static int intel_pmu_hw_config(struct perf_event *event) if (even

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-24 Thread peterz
On Fri, Jul 24, 2020 at 03:19:06PM +0200, pet...@infradead.org wrote: > On Thu, Jul 23, 2020 at 10:11:11AM -0700, kan.li...@linux.intel.com wrote: > > @@ -3375,6 +3428,72 @@ static int intel_pmu_hw_config(struct perf_event > > *event) > > if (event->attr.type != PERF_TYPE_RAW) > >

Re: [PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-24 Thread peterz
On Thu, Jul 23, 2020 at 10:11:11AM -0700, kan.li...@linux.intel.com wrote: > @@ -3375,6 +3428,72 @@ static int intel_pmu_hw_config(struct perf_event > *event) > if (event->attr.type != PERF_TYPE_RAW) > return 0; > > + /* > + * Config Topdown slots and metric events >

[PATCH V7 08/14] perf/x86/intel: Generic support for hardware TopDown metrics

2020-07-23 Thread kan . liang
From: Kan Liang Intro = The TopDown Microarchitecture Analysis (TMA) Method is a structured analysis methodology to identify critical performance bottlenecks in out-of-order processors. Current perf has supported the method. The method works well, but there is one problem. To collect the To