1 #!/bin/sh 2 # perf all metricgroups test 3 # SPDX-License-Identifier: GPL-2.0 4 5 set -e 6 7 ParanoidAndNotRoot() 8 { 9 [ "$(id -u)" != 0 ] && [ "$(cat /proc/sys/kernel/perf_event_paranoid)" -gt $1 ] 10 } 11 12 system_wide_flag="-a" 13 if ParanoidAndNotRoot 0 14 then 15 system_wide_flag="" 16 fi 17 18 for m in $(perf list --raw-dump metricgroups) 19 do 20 echo "Testing $m" 21 perf stat -M "$m" $system_wide_flag sleep 0.01 22 done 23 24 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.