2 # perf all metrics test
3 # SPDX-License-Identifier: GPL-2.0
6 for m in $(perf list --raw-dump metrics); do
8 result=$(perf stat -M "$m" true 2>&1)
9 if [[ "$result" =~ "${m:0:50}" ]] || [[ "$result" =~ "<not supported>" ]]
13 # Failed so try system wide.
14 result=$(perf stat -M "$m" -a true 2>&1)
15 if [[ "$result" =~ "${m:0:50}" ]]
19 # Failed again, possibly the workload was too small so retry with something
21 result=$(perf stat -M "$m" perf bench internals synthesize 2>&1)
22 if [[ "$result" =~ "${m:0:50}" ]]
26 echo "Metric '$m' not printed in:"
28 if [[ "$err" != "1" ]]
31 if [[ "$result" =~ "FP_ARITH" || "$result" =~ "AMX" ]]
33 echo "Skip, not fail, for FP issues"
34 elif [[ "$result" =~ "PMM" ]]
36 echo "Skip, not fail, for Optane memory issues"