mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
perf test: Workload test of all PMUs
Iterate over the list of PMUs and run the 'true' workload on them. If the event isn't printed then run the large 'perf bench internals synthesize' workload and check the event is counted. On a Skylake this test takes 1m15s mainly running the 'true' workload. Suggested-by: John Garry <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Reviewed-by: John Garry <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
1 parent
4a87dea9e6
commit
3d5ac9effc
1 file changed
+22
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# perf all PMU test
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
set -e
|
||||
|
||||
for p in $(perf list --raw-dump pmu); do
|
||||
echo "Testing $p"
|
||||
result=$(perf stat -e "$p" true 2>&1)
|
||||
if [[ ! "$result" =~ "$p" ]] && [[ ! "$result" =~ "<not supported>" ]]; then
|
||||
# We failed to see the event and it is supported. Possibly the workload was
|
||||
# too small so retry with something longer.
|
||||
result=$(perf stat -e "$p" perf bench internals synthesize 2>&1)
|
||||
if [[ ! "$result" =~ "$p" ]]; then
|
||||
echo "Event '$p' not printed in:"
|
||||
echo "$result"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user