[PATCH v3 0/5] perf vendor events arm64: Update N2 and V2 metrics and events using Arm telemetry repo

James Clark james.clark at arm.com
Tue Jul 11 03:02:10 PDT 2023


Changes since v2:
  * version -> variant in second commit message
  * Add a bit more detail about version matching in the second commit
    message
  * Update the comments in pmu-events/arch/arm64/mapfile.csv to say that
    variant and revision fields are now used
  * Increase the CC list

Changes since v1:
  * Split last change into two so it doesn't hit the mailing list size
    limit

--------

Hi,

This change introduces a new concept for JSON files on Arm where it's
now possible to provide JSONs for multiple versions of a CPU. This
change is in the second commit of the set. It can be used for the case
where a fix is made to how a metric is calculated or the description or
availability of a PMU event etc.

It has the side effect of sorting the pmu_events_map for all platforms
so I want to make sure that nobody thinks that's an issue. I'm pretty
sure there is no dependency on any ordering currently so it should be
fine IMO, but worth thinking about. The sort is always done, rather than
just for Arm, only to simplify the change. But I suppose it also helps
to have consistency there in case any other platform needs to depend on
the ordering in the future.

I don't see this being used very often, or even ever again, so
I don't think it's worth adding any higher level feature that
deduplicates events and metrics that don't change between versions. It's
better to keep it simple and use the existing mechanism, but just treat
different versions of the same CPU as entirely different CPUs.

Thanks
James

James Clark (5):
  perf: cs-etm: Don't duplicate FIELD_GET()
  perf jevents: Match on highest version of Arm json file available
  perf vendor events arm64: Update scale units and descriptions of
    common topdown metrics
  perf vendor events arm64: Update N2-r0p3 and V2 metrics and events
    using Arm telemetry repo
  perf vendor events arm64: Update N2-r0p0 metrics and events using Arm
    telemetry repo

 tools/perf/arch/arm64/util/header.c           |  61 +++-
 .../arch/arm64/arm/neoverse-n2-v2/branch.json |   8 -
 .../arch/arm64/arm/neoverse-n2-v2/bus.json    |  20 --
 .../arch/arm64/arm/neoverse-n2-v2/cache.json  | 155 --------
 .../arm64/arm/neoverse-n2-v2/exception.json   |  47 ---
 .../arm64/arm/neoverse-n2-v2/instruction.json | 143 --------
 .../arch/arm64/arm/neoverse-n2-v2/memory.json |  41 ---
 .../arm64/arm/neoverse-n2-v2/metrics.json     | 273 --------------
 .../arm64/arm/neoverse-n2-v2/pipeline.json    |  23 --
 .../arch/arm64/arm/neoverse-n2-v2/spe.json    |  14 -
 .../arch/arm64/arm/neoverse-n2-v2/trace.json  |  29 --
 .../arch/arm64/arm/neoverse-n2r0p0/bus.json   |  18 +
 .../arm64/arm/neoverse-n2r0p0/exception.json  |  62 ++++
 .../arm/neoverse-n2r0p0/fp_operation.json     |  22 ++
 .../arm64/arm/neoverse-n2r0p0/general.json    |  10 +
 .../arm64/arm/neoverse-n2r0p0/l1d_cache.json  |  54 +++
 .../arm64/arm/neoverse-n2r0p0/l1i_cache.json  |  14 +
 .../arm64/arm/neoverse-n2r0p0/l2_cache.json   |  50 +++
 .../arm64/arm/neoverse-n2r0p0/l3_cache.json   |  22 ++
 .../arm64/arm/neoverse-n2r0p0/ll_cache.json   |  10 +
 .../arm64/arm/neoverse-n2r0p0/memory.json     |  46 +++
 .../arm64/arm/neoverse-n2r0p0/metrics.json    | 332 ++++++++++++++++++
 .../arm64/arm/neoverse-n2r0p0/retired.json    |  30 ++
 .../arch/arm64/arm/neoverse-n2r0p0/spe.json   |  18 +
 .../arm/neoverse-n2r0p0/spec_operation.json   | 110 ++++++
 .../arch/arm64/arm/neoverse-n2r0p0/stall.json |  30 ++
 .../arch/arm64/arm/neoverse-n2r0p0/sve.json   |  50 +++
 .../arch/arm64/arm/neoverse-n2r0p0/tlb.json   |  66 ++++
 .../arch/arm64/arm/neoverse-n2r0p0/trace.json |  38 ++
 .../arm64/arm/neoverse-n2r0p3-v2/bus.json     |  18 +
 .../arm/neoverse-n2r0p3-v2/exception.json     |  62 ++++
 .../arm/neoverse-n2r0p3-v2/fp_operation.json  |  22 ++
 .../arm64/arm/neoverse-n2r0p3-v2/general.json |  10 +
 .../arm/neoverse-n2r0p3-v2/l1d_cache.json     |  54 +++
 .../arm/neoverse-n2r0p3-v2/l1i_cache.json     |  14 +
 .../arm/neoverse-n2r0p3-v2/l2_cache.json      |  50 +++
 .../arm/neoverse-n2r0p3-v2/l3_cache.json      |  22 ++
 .../arm/neoverse-n2r0p3-v2/ll_cache.json      |  10 +
 .../arm64/arm/neoverse-n2r0p3-v2/memory.json  |  46 +++
 .../arm64/arm/neoverse-n2r0p3-v2/metrics.json | 331 +++++++++++++++++
 .../arm64/arm/neoverse-n2r0p3-v2/retired.json |  30 ++
 .../arm64/arm/neoverse-n2r0p3-v2/spe.json     |  18 +
 .../neoverse-n2r0p3-v2/spec_operation.json    | 110 ++++++
 .../arm64/arm/neoverse-n2r0p3-v2/stall.json   |  30 ++
 .../arm64/arm/neoverse-n2r0p3-v2/sve.json     |  50 +++
 .../arm64/arm/neoverse-n2r0p3-v2/tlb.json     |  66 ++++
 .../arm64/arm/neoverse-n2r0p3-v2/trace.json   |  38 ++
 tools/perf/pmu-events/arch/arm64/mapfile.csv  |  17 +-
 tools/perf/pmu-events/arch/arm64/sbsa.json    |  24 +-
 tools/perf/pmu-events/jevents.py              |  49 +--
 tools/perf/tests/pmu-events.c                 |  34 ++
 tools/perf/util/cs-etm.c                      |  14 +-
 52 files changed, 2099 insertions(+), 816 deletions(-)
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/branch.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/bus.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/cache.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/exception.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/instruction.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/memory.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/metrics.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/pipeline.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/spe.json
 delete mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/trace.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/bus.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/exception.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/fp_operation.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/general.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/l1d_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/l1i_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/l2_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/l3_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/ll_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/memory.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/metrics.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/retired.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/spe.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/spec_operation.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/stall.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/sve.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/tlb.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p0/trace.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/bus.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/exception.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/fp_operation.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/general.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/l1d_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/l1i_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/l2_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/l3_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/ll_cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/memory.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/metrics.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/retired.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/spe.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/spec_operation.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/stall.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/sve.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/tlb.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2r0p3-v2/trace.json

-- 
2.34.1




More information about the linux-arm-kernel mailing list