Re: [PATCH v7] perf stat: Include PMU name and split uncore events per PMU in metric-only JSON output
From: Namhyung Kim
Date: Wed Nov 11 2026 - 01:32:55 EST
On Tue, Nov 10, 2026 at 11:22:38AM +0800, Hang Zhengyang wrote:
> 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?
I believe it's intended and looks fine.
Ian, are you ok with this?
Thanks,
Na