[RFC PATCH v1 12/14] perf stat: Extend JSON output linter to test advanced PMU and metric-only checks
From: Ian Rogers
Date: Fri May 22 2026 - 18:36:23 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>
TAG=agy
CONV=7c33d6a0-70a2-454a-82f7-4de2101a5b9c
---
tools/perf/tests/shell/stat+json_output.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/tests/shell/stat+json_output.sh b/tools/perf/tests/shell/stat+json_output.sh
index d35098aae093..3d513de0e6e7 100755
--- a/tools/perf/tests/shell/stat+json_output.sh
+++ b/tools/perf/tests/shell/stat+json_output.sh
@@ -248,6 +248,12 @@ then
check_per_die
check_per_socket
fi
+if [ $skip_test -ne 1 ]
+then
+ check_per_cache_instance
+ check_per_cluster
+fi
+check_metric_only
cleanup
exit 0
--
2.54.0.794.g4f17f83d09-goog