]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf test stat csv: Update test expectations and events
authorIan Rogers <irogers@google.com>
Tue, 11 Nov 2025 21:22:05 +0000 (13:22 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 12 Nov 2025 00:48:36 +0000 (16:48 -0800)
Explicitly use a metric rather than implicitly expecting '-e
instructions,cycles' to produce a metric. Use a metric with software
events to make it more compatible.

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

index c2ec7881ec1de40bd6f082820823f7235d38f70a..3c36e80fe42287f4863c9bc52fa12e944a9db096 100644 (file)
@@ -156,7 +156,7 @@ check_metric_only()
                echo "[Skip] CPU-measurement counter facility not installed"
                return
        fi
-       perf stat --metric-only $2 -e instructions,cycles true
+       perf stat --metric-only $2 -M page_faults_per_second true
        commachecker --metric-only
        echo "[Success]"
 }
index 7a6f6e1774028322a4be0323cf724bd08ecfc3fe..cd6fff597091166f4ebd82c1534bd5e1f9dc98bb 100755 (executable)
@@ -44,7 +44,7 @@ function commachecker()
        ;; "--per-die")         exp=8
        ;; "--per-cluster")     exp=8
        ;; "--per-cache")       exp=8
-       ;; "--metric-only")     exp=2
+       ;; "--metric-only")     exp=1
        esac
 
        while read line