Re: [PATCH v7] perf stat: Include PMU name and split uncore events per PMU in metric-only JSON output

From: Hang Zhengyang

Date: Mon Nov 09 2026 - 22:27:56 EST


On Fri, 30 Oct 2026 12:25:37 -0700, Chun-Tse Shao wrote:
> When running `perf stat` with `-A` (--no-aggr) and `--metric-only` in
> JSON output mode (`-j`), [...]

Tested on AMD Zen 3 on top of perf-tools-next 13a8d580433a. With
'-M l3_cache,data_fabric,iotlb -a -A --metric-only -j' the metrics are
now on separate lines labeled amd_l3, amd_df and amd_iommu_0. STD, CSV
and aggregated JSON output are unchanged, and the stat linters pass.

Tested-by: Hang Zhengyang <hang.zhengyang1010@xxxxxxxxx>

Two changes the changelog doesn't mention:

- Without -M, 'perf stat -a -A --metric-only -j' now prints two lines
per CPU; the first is labeled "pmu" : "software".

- Plain 'perf stat -a -A -j' gets the "pmu" key too.

Are those intended?

(Tested with the help of an AI assistant; I checked the results.)