linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean V Kelley <seanvk.dev@oregontracks.org>
To: john.garry@huawei.com
Cc: linux-perf-users@vger.kernel.org, wcohen@redhat.com,
	acme@kernel.org, linux-arm-kernel@lists.infradead.org,
	linuxarm@huawei.com
Subject: Re: [PATCH v2] perf vendor events arm64: Revise core JSON events for eMAG
Date: Thu, 13 Sep 2018 08:07:40 -0700	[thread overview]
Message-ID: <CAAbOPF1cKwmn9LzFbKVhXparjHOBu2FMcsvO1SZLUrortQYAJQ@mail.gmail.com> (raw)
In-Reply-To: <CAAbOPF1xSQ_ksqWHm9UYgK_TsAPY3biu3fv9hQn_-ayvjjRk_Q@mail.gmail.com>

On Mon, Sep 10, 2018 at 8:31 AM Sean V Kelley
<seanvk.dev@oregontracks.org> wrote:
>
> On Mon, Sep 10, 2018 at 2:02 AM John Garry <john.garry@huawei.com> wrote:
> >
> > On 10/09/2018 01:26, Sean V Kelley wrote:
> > > Split the PMU events into meaningful functional groups.  Update core
> > > pmu events based on supported ARMv8 recommended IMPLEMENTATION DEFINED
> > > events.
> > >
> > > The JSON files are updated with reference to a PMU table shared here:
> > >
> > > https://github.com/AmpereComputing/ampere-centos-kernel/blob/amp-centos-7.5-kernel/Documentation/arm64/eMAG-ARM-CoreImpDefined.pdf
> > >
> > > --
> > > Changes in V2:
> > > - Provided documentation for changes - John, William
> > > - Broke up into meaningful groups - William
> > > --
> > >


Gentle reminder for additional feedback on my V2 patch.

Thanks!

Sean


> > > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > > Cc: William Cohen <wcohen@redhat.com>
> > > Cc: John Garry <john.garry@huawei.com>
> > > Cc: linux-arm-kernel@lists.infradead.org
> > >
> > > Signed-off-by: Sean V Kelley <seanvk.dev@oregontracks.org>
> > > ---
> > >  .../arch/arm64/ampere/emag/branch.json        |  23 +++
> > >  .../arch/arm64/ampere/emag/bus.json           |  26 +++
> > >  .../arch/arm64/ampere/emag/cache.json         | 191 ++++++++++++++++++
> > >  .../arch/arm64/ampere/emag/clock.json         |  20 ++
> > >  .../arch/arm64/ampere/emag/core-imp-def.json  |  32 ---
> > >  .../arch/arm64/ampere/emag/counter.json       |   8 +
> > >  .../arch/arm64/ampere/emag/exception.json     |  50 +++++
> > >  .../arch/arm64/ampere/emag/instruction.json   |  89 ++++++++
> > >  .../arch/arm64/ampere/emag/intrinsic.json     |  14 ++
> > >  .../arch/arm64/ampere/emag/memory.json        |  29 +++
> > >  .../arch/arm64/ampere/emag/pipeline.json      |  50 +++++
> > >  11 files changed, 500 insertions(+), 32 deletions(-)
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/cache.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/clock.json
> > >  delete mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/core-imp-def.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/counter.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/exception.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/instruction.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/intrinsic.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/memory.json
> > >  create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/emag/pipeline.json
> >
> > I don't feel too strongly about this, but it would be better to organise
> > all arm64 JSONs into this same structre for consistency?
> >
> > However I actually like a single per-chip JSON for arm64 since it allows
> > easy diff against armv8-recommended.json, so we don't miss/replicate events.
>
> Well for those matching implementation defined counters, i.e.,
> "ArchStdEvent", we could retain core-imp-def.json.
> But allow break-out of the rest.  That would satisfy the easy diff
> against the armv8-recommended.json.
>
> >
> >
> > >
> > > diff --git a/tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json b/tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json
> > > new file mode 100644
> > > index 000000000000..abc98b018446
> > > --- /dev/null
> > > +++ b/tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json
> > > @@ -0,0 +1,23 @@
> > > +[
> > > +    {
> > > +        "ArchStdEvent": "BR_IMMED_SPEC",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BR_RETURN_SPEC",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BR_INDIRECT_SPEC",
> > > +    },
> > > +    {
> > > +        "PublicDescription": "Mispredicted or not predicted branch speculatively executed",
> > > +        "EventCode": "0x10",
> > > +        "EventName": "BR_MIS_PRED",
> > > +        "BriefDescription": "Branch mispredicted"
> >
> > Isn't this a common architectural event, covered by the arm64 kernel
> > perf driver?
> >
>
> Yes, it is exposed by the ARM64 perf driver, armv8_pmuv3_0.  I'm not
> sure that an additional alias would be problematic and it actually
> allows for descriptions.
> Finally, I'm trying to synchronize this patch with a patch to ARM's
> StreamLine gator daemon here with the same information:
>
> https://github.com/ARM-software/gator/pull/5/commits/bfd20f692ac4ff69b0363ec57d78ed7ed914adca
>
>
> Thanks,
>
> Sean
>
>
>
>
> >
> > > +    },
> > > +    {
> > > +        "PublicDescription": "Predictable branch speculatively executed",
> > > +        "EventCode": "0x12",
> > > +        "EventName": "BR_PRED",
> > > +        "BriefDescription": "Predictable branch"
> > > +    },
> > > +]
> > > diff --git a/tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json b/tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json
> > > new file mode 100644
> > > index 000000000000..687b2629e1d1
> > > --- /dev/null
> > > +++ b/tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json
> > > @@ -0,0 +1,26 @@
> > > +[
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_RD",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_WR",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_SHARED",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_NOT_SHARED",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_NORMAL",
> > > +    },
> > > +    {
> > > +        "ArchStdEvent": "BUS_ACCESS_PERIPH",
> > > +    },
> > > +    {
> > > +        "PublicDescription": "Bus access",
> > > +        "EventCode": "0x19",
> > > +        "EventName": "BUS_ACCESS",
> > > +        "BriefDescription": "Bus access"
> >
> > > +    },
> > > +]
> >
> > Thanks,
> > John
> >

  reply	other threads:[~2018-09-13 15:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10  0:26 [PATCH v2] perf vendor events arm64: Revise core JSON events for eMAG Sean V Kelley
2018-09-10  9:02 ` John Garry
2018-09-10 15:31   ` Sean V Kelley
2018-09-13 15:07     ` Sean V Kelley [this message]
2018-09-16 20:39 ` William Cohen
2018-09-17  8:53   ` John Garry
2018-09-17 14:39     ` William Cohen
2018-09-17 15:40       ` Sean V Kelley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAbOPF1cKwmn9LzFbKVhXparjHOBu2FMcsvO1SZLUrortQYAJQ@mail.gmail.com \
    --to=seanvk.dev@oregontracks.org \
    --cc=acme@kernel.org \
    --cc=john.garry@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=wcohen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).