[RFC PATCH v2 12/14] perf stat: Extend JSON output linter to test advanced PMU and metric-only checks

From: Ian Rogers

Date: Mon May 25 2026 - 19:22:39 EST


This patch extends tools/perf/tests/shell/stat+json_output.sh to run
the advanced hardware PMU, topology-aware aggregation, and metric-only
JSON checks a second time under the --new print flag:

- check_per_cache_instance
- check_per_cluster
- check_metric_only

This guarantees that JSON outputs produced by the decoupled streaming printing callbacks
are verified and structurally valid under advanced topology-aware modes and metric-only
JSON row-column layouts.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Assisted-by: Antigravity:gemini-3.5-flash
---
tools/perf/tests/shell/stat+json_output.sh | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/perf/tests/shell/stat+json_output.sh b/tools/perf/tests/shell/stat+json_output.sh
index 8168b861ade7..d18cac5dcff1 100755
--- a/tools/perf/tests/shell/stat+json_output.sh
+++ b/tools/perf/tests/shell/stat+json_output.sh
@@ -249,7 +249,10 @@ then
check_per_core
check_per_die
check_per_socket
+ check_per_cache_instance
+ check_per_cluster
fi
+check_metric_only

cleanup
exit 0
--
2.54.0.794.g4f17f83d09-goog