Re: [PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-06 Thread Andi Kleen
On Tue, Jun 06, 2017 at 06:21:08PM +0200, Peter Zijlstra wrote: > On Tue, Jun 06, 2017 at 06:51:20AM -0700, Andi Kleen wrote: > > > Not too happy about that.. > > > > > > P(LVLX, L4) | P(LVLX, REMOTE) > > > > > > reads like something that should be PERF_MEM_LVL_REM_CCE1 or something > > > > CC

Re: [PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-06 Thread Peter Zijlstra
On Tue, Jun 06, 2017 at 06:51:20AM -0700, Andi Kleen wrote: > > Not too happy about that.. > > > > P(LVLX, L4) | P(LVLX, REMOTE) > > > > reads like something that should be PERF_MEM_LVL_REM_CCE1 or something > > CCE1? You mean L4? #define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop)

Re: [PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-06 Thread Andi Kleen
> Not too happy about that.. > > P(LVLX, L4) | P(LVLX, REMOTE) > > reads like something that should be PERF_MEM_LVL_REM_CCE1 or something CCE1? You mean L4? The two bits seem cleaner to me than enumerating all cases. But ok. REM_L4 > This new generic 'REMOTE' has too much overlap with the

Re: [PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-06 Thread Peter Zijlstra
On Mon, Jun 05, 2017 at 03:48:34PM -0700, Andi Kleen wrote: > +void __init intel_pmu_pebs_data_source_skl(void) > +{ > + pebs_data_source[0x08] = OP_LH | P(LVLX, L4) | P(SNOOP, HIT); > + pebs_data_source[0x09] = OP_LH | P(LVLX, L4) | P(LVLX, REMOTE) | > P(SNOOP, HIT); > + pebs_data_so

[PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-05 Thread Andi Kleen
From: Andi Kleen Skylake changed the encoding of the PEBS data source field. Some combinations are not available anymore, but some new cases e.g. for L4 cache hit are added. Fix up the conversion table for Skylake, similar as had been done for Nehalem. To properly describe it in the abstracted

[PATCH 2/6] perf/x86: Fix data source decoding for Skylake

2017-06-02 Thread Andi Kleen
From: Andi Kleen Skylake changed the encoding of the PEBS data source field. Some combinations are not available anymore, but some new cases e.g. for L4 cache hit are added. Fix up the conversion table for Skylake, similar as had been done for Nehalem. To properly describe it in the abstracted