Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685453 > unrolled thread

[GIT PULL] Please pull JSON files for Power9 PMU events

Started bySukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
First post2017-07-12 04:10 +0200
Last post2017-07-13 05:50 +0200
Articles 9 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL] Please pull JSON files for Power9 PMU events Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2017-07-12 04:10 +0200
    Re: [GIT PULL] Please pull JSON files for Power9 PMU events Michael Ellerman <mpe@ellerman.id.au> - 2017-07-12 14:10 +0200
      Re: [GIT PULL] Please pull JSON files for Power9 PMU events Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-12 16:50 +0200
        Re: [GIT PULL] Please pull JSON files for Power9 PMU events Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2017-07-12 18:50 +0200
          Re: [GIT PULL] Please pull JSON files for Power9 PMU events Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-12 21:50 +0200
          Re: [GIT PULL] Please pull JSON files for Power9 PMU events Michael Ellerman <mpe@ellerman.id.au> - 2017-07-13 05:50 +0200
            Re: [GIT PULL] Please pull JSON files for Power9 PMU events Jiri Olsa <jolsa@redhat.com> - 2017-07-13 10:10 +0200
              Re: [GIT PULL] Please pull JSON files for Power9 PMU events Michael Ellerman <mpe@ellerman.id.au> - 2017-07-13 12:00 +0200
        Re: [GIT PULL] Please pull JSON files for Power9 PMU events Michael Ellerman <mpe@ellerman.id.au> - 2017-07-13 05:50 +0200

#1685453 — [GIT PULL] Please pull JSON files for Power9 PMU events

FromSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date2017-07-12 04:10 +0200
Subject[GIT PULL] Please pull JSON files for Power9 PMU events
Message-ID<u2fge-1TD-13@gated-at.bofh.it>
Hi Arnaldo,

Please pull the JSON files for POWER9 PMU events.

The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:

  Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)

are available in the git repository at:

  https://github.com/sukadev/linux/ p9-json

for you to fetch changes up to f94a86dbb13e18bd7ad566cabe42df63d3bd1039:

  perf vendor events: Add POWER9 PVRs to mapfile (2017-07-11 19:30:40 -0500)

----------------------------------------------------------------
Sukadev Bhattiprolu (2):
      perf vendor events: Add POWER9 PMU events
      perf vendor events: Add POWER9 PVRs to mapfile

 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   2 +
 .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
 .../arch/powerpc/power9/floating-point.json        |  44 ++
 .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
 .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
 .../perf/pmu-events/arch/powerpc/power9/other.json | 836 +++++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/pipeline.json   | 680 +++++++++++++++++
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 146 ++++
 .../arch/powerpc/power9/translation.json           | 272 +++++++
 10 files changed, 3542 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/cache.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/floating-point.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/frontend.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/marked.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/memory.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/other.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pmc.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/translation.json

[toc] | [next] | [standalone]


#1685727

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-07-12 14:10 +0200
Message-ID<u2oCR-858-3@gated-at.bofh.it>
In reply to#1685453
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:

> Hi Arnaldo,
>
> Please pull the JSON files for POWER9 PMU events.
>
> The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:
>
>   Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)
>
> are available in the git repository at:
>
>   https://github.com/sukadev/linux/ p9-json
>
> for you to fetch changes up to f94a86dbb13e18bd7ad566cabe42df63d3bd1039:
>
>   perf vendor events: Add POWER9 PVRs to mapfile (2017-07-11 19:30:40 -0500)
>
> ----------------------------------------------------------------
> Sukadev Bhattiprolu (2):
>       perf vendor events: Add POWER9 PMU events
>       perf vendor events: Add POWER9 PVRs to mapfile

I think the PVRs need work.

You have:

+004e0100,1,power9.json,core
+004e0000,1,power9.json,core

The first is P9 DD1, but the second doesn't exist. We have it in the
kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
do any masking or anything fancy, it looks for an exact match.

So for starters you should probably drop that one and add 0x004e1200 and
0x004e0200.

cheers

[toc] | [prev] | [next] | [standalone]


#1685831

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-07-12 16:50 +0200
Message-ID<u2r7H-140-9@gated-at.bofh.it>
In reply to#1685727
Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> > Please pull the JSON files for POWER9 PMU events.

> >       perf vendor events: Add POWER9 PMU events
> >       perf vendor events: Add POWER9 PVRs to mapfile
 
> I think the PVRs need work.
 
> You have:
 
> +004e0100,1,power9.json,core
> +004e0000,1,power9.json,core
 
> The first is P9 DD1, but the second doesn't exist. We have it in the
> kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
> do any masking or anything fancy, it looks for an exact match.
 
> So for starters you should probably drop that one and add 0x004e1200 and
> 0x004e0200.

Could this check be somehow done automatically? Using whatever is in the
kernel sources or some IBM released document?

- Arnaldo

[toc] | [prev] | [next] | [standalone]


#1685907

FromSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date2017-07-12 18:50 +0200
Message-ID<u2sZP-2cp-1@gated-at.bofh.it>
In reply to#1685831
Arnaldo Carvalho de Melo [acme@kernel.org] wrote:
> Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> > Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> > > Please pull the JSON files for POWER9 PMU events.
> 
> > >       perf vendor events: Add POWER9 PMU events
> > >       perf vendor events: Add POWER9 PVRs to mapfile
> 
> > I think the PVRs need work.
> 
> > You have:
> 
> > +004e0100,1,power9.json,core
> > +004e0000,1,power9.json,core
> 
> > The first is P9 DD1, but the second doesn't exist. We have it in the
> > kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
> > do any masking or anything fancy, it looks for an exact match.
> 
> > So for starters you should probably drop that one and add 0x004e1200 and
> > 0x004e0200.

Yes, thanks.

> 
> Could this check be somehow done automatically? Using whatever is in the
> kernel sources or some IBM released document?

Yes, had a recent discussion offline with Michael Petlan and Jiri about
generalizing/simplifying this. For now, I have added the above PVRs and
will look into the broader fix.

The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:

  Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)

are available in the git repository at:

  https://github.com/sukadev/linux/ p9-json

for you to fetch changes up to 8870b54739866c6eea23c36a0125af8045fbd572:

  perf vendor events: Add POWER9 PVRs to mapfile (2017-07-12 11:11:00 -0500)

----------------------------------------------------------------
Sukadev Bhattiprolu (2):
      perf vendor events: Add POWER9 PMU events
      perf vendor events: Add POWER9 PVRs to mapfile

 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
 .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
 .../arch/powerpc/power9/floating-point.json        |  44 ++
 .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
 .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
 .../perf/pmu-events/arch/powerpc/power9/other.json | 836 +++++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/pipeline.json   | 680 +++++++++++++++++
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 146 ++++
 .../arch/powerpc/power9/translation.json           | 272 +++++++
 10 files changed, 3543 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/cache.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/floating-point.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/frontend.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/marked.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/memory.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/other.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pmc.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/translation.json

[toc] | [prev] | [next] | [standalone]


#1686005

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-07-12 21:50 +0200
Message-ID<u2vO1-41S-5@gated-at.bofh.it>
In reply to#1685907
Em Wed, Jul 12, 2017 at 09:40:08AM -0700, Sukadev Bhattiprolu escreveu:
> Arnaldo Carvalho de Melo [acme@kernel.org] wrote:
> > Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> > > So for starters you should probably drop that one and add 0x004e1200 and
> > > 0x004e0200.
 
> Yes, thanks.
 
> > Could this check be somehow done automatically? Using whatever is in the
> > kernel sources or some IBM released document?
 
> Yes, had a recent discussion offline with Michael Petlan and Jiri about
> generalizing/simplifying this. For now, I have added the above PVRs and
> will look into the broader fix.
 
> The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:
 
>   Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)
 
> are available in the git repository at:
 
>   https://github.com/sukadev/linux/ p9-json

Can you please base your branches out ouf tip/perf/core or
acme/perf/core when you submit it with the fixes discussed here?

thanks,

- Arnaldo

[toc] | [prev] | [next] | [standalone]


#1686217

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-07-13 05:50 +0200
Message-ID<u2Dix-iK-3@gated-at.bofh.it>
In reply to#1685907
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
...
>
>  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
>  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
>  .../arch/powerpc/power9/floating-point.json        |  44 ++
>  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
>  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
>  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++

In the map file we have "power9.json", but the files are power9/x.json.
How does that work?

cheers

[toc] | [prev] | [next] | [standalone]


#1686353

FromJiri Olsa <jolsa@redhat.com>
Date2017-07-13 10:10 +0200
Message-ID<u2Hma-34F-13@gated-at.bofh.it>
In reply to#1686217
On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote:
> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> ...
> >
> >  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
> >  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
> >  .../arch/powerpc/power9/floating-point.json        |  44 ++
> >  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
> >  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
> >  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
> 
> In the map file we have "power9.json", but the files are power9/x.json.
> How does that work?

hum, we take just the base name from that string and use it
as a map to the directory/struct with events.. so no harm done

I guess it's the leftover from when we switched from single file
to per topic event files.. x86 arch seems to have it right

I'll send the fix

thanks,
jirka

[toc] | [prev] | [next] | [standalone]


#1686420

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-07-13 12:00 +0200
Message-ID<u2J4C-3Zi-13@gated-at.bofh.it>
In reply to#1686353
Jiri Olsa <jolsa@redhat.com> writes:

> On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote:
>> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
>> ...
>> >
>> >  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
>> >  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
>> >  .../arch/powerpc/power9/floating-point.json        |  44 ++
>> >  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
>> >  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
>> >  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
>> 
>> In the map file we have "power9.json", but the files are power9/x.json.
>> How does that work?
>
> hum, we take just the base name from that string and use it
> as a map to the directory/struct with events.. so no harm done

I figured it must be working somehow but it's a bit odd :)

> I guess it's the leftover from when we switched from single file
> to per topic event files.. x86 arch seems to have it right

Yep.

> I'll send the fix

Thanks.

cheers

[toc] | [prev] | [next] | [standalone]


#1686218

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-07-13 05:50 +0200
Message-ID<u2Dix-iK-7@gated-at.bofh.it>
In reply to#1685831
Arnaldo Carvalho de Melo <acme@kernel.org> writes:

> Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
>> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
>> > Please pull the JSON files for POWER9 PMU events.
>
>> >       perf vendor events: Add POWER9 PMU events
>> >       perf vendor events: Add POWER9 PVRs to mapfile
>  
>> I think the PVRs need work.
>  
>> You have:
>  
>> +004e0100,1,power9.json,core
>> +004e0000,1,power9.json,core
>  
>> The first is P9 DD1, but the second doesn't exist. We have it in the
>> kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
>> do any masking or anything fancy, it looks for an exact match.
>  
>> So for starters you should probably drop that one and add 0x004e1200 and
>> 0x004e0200.
>
> Could this check be somehow done automatically? Using whatever is in the
> kernel sources or some IBM released document?

Not really no.

The kernel defines the major versions in arch/powerpc/include/asm/reg.h.

eg:

#define PVR_POWER8E	0x004B
#define PVR_POWER8NVL	0x004C
#define PVR_POWER8	0x004D
#define PVR_POWER9	0x004E


But that's only the top part of the value perf is looking for. To match
the full value you also need the minor revision.

I don't actually have an exhaustive list of all the Power8 revisions
that were/will ever be made. And for Power9 I definitely can't give you
a full list yet.

We do want to be able to match against the full PVR, in case we need a
different set of events for a particularly CPU revision.

But we could make it easier to maintain by making the search iterative.
ie. instead of just looking for an exact match, we could say that the
mapfile is sorted, and the first entry that matches will be used.

With a mapfile like:

004e0100,1,power9.json,core
004e,1,power9.json,core

That would match Power9 DD1 on the first line, but all other Power9 CPUs
would hit the second line. Obviously get_cpuid_str() would need to be
reworked to be match_cpuid_str() or something.

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web