]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf test stat: Update shadow test to use metrics
authorIan Rogers <irogers@google.com>
Tue, 11 Nov 2025 21:22:03 +0000 (13:22 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 12 Nov 2025 00:48:35 +0000 (16:48 -0800)
Previously '-e cycles,instructions' would implicitly create an IPC
metric. This now has to be explicit with '-M insn_per_cycle'.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/shell/stat+shadow_stat.sh

index 8824f445d343083c9389d92138eff69d276eeaf5..cabbbf17c662df2362362870db1ef79fe6389532 100755 (executable)
@@ -14,7 +14,7 @@ perf stat -a -e cycles sleep 1 2>&1 | grep -e cpu_core && exit 2
 
 test_global_aggr()
 {
-       perf stat -a --no-big-num -e cycles,instructions sleep 1  2>&1 | \
+       perf stat -a --no-big-num -M insn_per_cycle sleep 1  2>&1 | \
        grep -e cycles -e instructions | \
        while read num evt _ ipc rest
        do
@@ -53,7 +53,7 @@ test_global_aggr()
 
 test_no_aggr()
 {
-       perf stat -a -A --no-big-num -e cycles,instructions sleep 1  2>&1 | \
+       perf stat -a -A --no-big-num -M insn_per_cycle sleep 1  2>&1 | \
        grep ^CPU | \
        while read cpu num evt _ ipc rest
        do