mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/9] perf: Add NVIDIA Tegra410 uncore PMU events and metrics
@ 2026-10-30 17:48 Besar Wicaksono
  2026-10-30 17:48 ` [PATCH v2 1/9] perf jevents: Add support for NVIDIA Tegra410 UCF PMU aliasing Besar Wicaksono
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Besar Wicaksono @ 2026-10-30 17:48 UTC (permalink / raw)
  To: acme, namhyung, irogers, ctshao
  Cc: linux-tegra, linux-arm-kernel, linux-perf-users, linux-kernel,
	vsethi, rwiley, skelley, mochs, rajjoshi, treding, jonathanh,
	john.garry, will, james.clark, mike.leach, leo.yan, mark.rutland,
	alexander.shishkin, jolsa, adrian.hunter, Besar Wicaksono

Add event aliases and derived metrics for the NVIDIA Tegra410 uncore
PMUs, and fix perf's aggregation of PMU instances that are numbered in
more than one parts in their name.

The series covers the UCF, PCIe, PCIe target, CPU memory latency, and
chip-to-chip interconnect PMUs. It provides symbolic names for the raw
event encodings and metrics for bandwidth, frequency, and average read
latency.

The PCIe and PCIe target PMUs are named nvidia_pcie_pmu_<socket>_rc_<rc>
and nvidia_pcie_tgt_pmu_<socket>_rc_<rc>. Their json Unit uses the
existing comma-separated form ("nvidia_pcie_pmu_,rc_"), but perf only
merged instances that differ in the trailing number, so these events and
metrics gave one result per socket and were reported incorrectly (e.g.
with --metric-only), as discussed in v1. Patches 6-9 fix this:

- Patch 6 adds a check of the cpumasks of all merged PMU instances to the
  zero-count skip in perf stat, so a socket that counts nothing shows 0
  instead of having its row hidden.
- Patch 7 merges PMU instances that match the same comma-separated json
  Unit. This also applies to the HiSilicon hisi_sccl PMUs, which use the
  same json form; not tested on HiSilicon hardware.
- Patch 8 labels a merged uncore counter after all of its PMUs, e.g.
  nvidia_pcie_pmu_*_rc_*/cycles/ or nvidia_ucf_pmu/cycles/, instead of
  after the first instance, such as nvidia_pcie_pmu_0_rc_0/cycles/.
  Output with --no-aggr is unchanged.
- Patch 9 describes these PMU names in the ABI document.

Changes in v2:
- Move the uncore JSON out of the sys directory and remove the
  "Compat" fields. Thanks to Ian Rogers for the feedback.
- Drop "perf jevents: Process model files before sys subdirectories",
  which this series no longer needs.
- Add UCF SLC and memory bandwidth metrics from all sources to local
  CMEM (read, write and read+write) and from local sources to local
  CMEM and to remote memory, PCIe bandwidth metrics to local
  destinations, and read+write bandwidth metrics for UCF SLC, UCF
  memory and PCIe. Thanks to Chun-Tse Shao for the suggestion.
- Add patches 6-9 to fix the PCIe instance aggregation. Thanks to Ian
  Rogers and Chun-Tse Shao for the pointers.

v1: https://lore.kernel.org/all/20261019164241.403644-1-bwicaksono@nvidia.com/

Besar Wicaksono (9):
  perf jevents: Add support for NVIDIA Tegra410 UCF PMU aliasing
  perf jevents: Add support for NVIDIA Tegra410 PCIE PMU aliasing
  perf jevents: Add support for NVIDIA Tegra410 PCIE-TGT PMU aliasing
  perf jevents: Add support for NVIDIA Tegra410 CPU Memory Latency PMU
    aliasing
  perf jevents: Add support for NVIDIA Tegra410 C2C PMU aliasing
  perf stat: Check merged PMU instance's cpumasks when skipping zero
    counts
  perf pmu: Merge PMU instances that match the same comma-separated json
    Unit
  perf evsel: Name a merged uncore counter after all of its PMUs
  perf Documentation: Describe PMU names numbered in more than one place

 .../testing/sysfs-bus-event_source-devices    |  14 +
 .../arm64/nvidia/t410/uncore-cpu_mem.json     |  43 +
 .../arm64/nvidia/t410/uncore-nvclink.json     |  67 ++
 .../arm64/nvidia/t410/uncore-nvdlink.json     |  43 +
 .../arm64/nvidia/t410/uncore-nvlink_c2c.json  | 115 +++
 .../arch/arm64/nvidia/t410/uncore-pcie.json   | 249 ++++++
 .../arm64/nvidia/t410/uncore-pcie_tgt.json    |  83 ++
 .../arch/arm64/nvidia/t410/uncore-ucf.json    | 764 ++++++++++++++++++
 tools/perf/tests/pmu.c                        | 134 +++
 tools/perf/util/evlist.c                      |   2 +-
 tools/perf/util/evsel.c                       |  83 +-
 tools/perf/util/evsel.h                       |   2 +-
 tools/perf/util/parse-events.c                |   2 +-
 tools/perf/util/pmu.c                         |  65 ++
 tools/perf/util/pmu.h                         |   9 +
 tools/perf/util/pmus.c                        |  47 ++
 tools/perf/util/pmus.h                        |   1 +
 tools/perf/util/stat-display.c                |  20 +
 18 files changed, 1737 insertions(+), 6 deletions(-)
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-cpu_mem.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-nvclink.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-nvdlink.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-nvlink_c2c.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-pcie.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-pcie_tgt.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-ucf.json

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-10-30 22:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 17:48 [PATCH v2 0/9] perf: Add NVIDIA Tegra410 uncore PMU events and metrics Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 1/9] perf jevents: Add support for NVIDIA Tegra410 UCF PMU aliasing Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 2/9] perf jevents: Add support for NVIDIA Tegra410 PCIE " Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 3/9] perf jevents: Add support for NVIDIA Tegra410 PCIE-TGT " Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 4/9] perf jevents: Add support for NVIDIA Tegra410 CPU Memory Latency " Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 5/9] perf jevents: Add support for NVIDIA Tegra410 C2C " Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 6/9] perf stat: Check merged PMU instance's cpumasks when skipping zero counts Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 7/9] perf pmu: Merge PMU instances that match the same comma-separated json Unit Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 8/9] perf evsel: Name a merged uncore counter after all of its PMUs Besar Wicaksono
2026-10-30 17:48 ` [PATCH v2 9/9] perf Documentation: Describe PMU names numbered in more than one place Besar Wicaksono
2026-10-30 18:07 ` [PATCH v2 0/9] perf: Add NVIDIA Tegra410 uncore PMU events and metrics Ian Rogers
2026-10-30 22:18   ` Besar Wicaksono

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®