1
0
Fork 0
linux/tools/perf/tests/shell/stat_all_metricgroups.sh
Daniel Baumann 79d69e5050
Adding upstream version 6.12.33.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 12:14:28 +02:00

24 lines
399 B
Bash
Executable file

#!/bin/sh
# perf all metricgroups test
# SPDX-License-Identifier: GPL-2.0
set -e
ParanoidAndNotRoot()
{
[ "$(id -u)" != 0 ] && [ "$(cat /proc/sys/kernel/perf_event_paranoid)" -gt $1 ]
}
system_wide_flag="-a"
if ParanoidAndNotRoot 0
then
system_wide_flag=""
fi
for m in $(perf list --raw-dump metricgroups)
do
echo "Testing $m"
perf stat -M "$m" $system_wide_flag sleep 0.01
done
exit 0