forked from andikleen/pmu-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add all-tester script to call all testers (except the parser tester for now) Add other-tester for testing interval-normalize and cputop and list-events Make test scripts slightly less verbose
- Loading branch information
Andi Kleen
committed
Oct 10, 2015
1 parent
b532d64
commit 6e66f83
Showing
5 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# one stop shop to test all pmu-tools test suites | ||
|
||
set -e | ||
set -x | ||
PATH=$PATH:. | ||
|
||
# test ocperf | ||
tester | ||
|
||
# test toplev | ||
tl-tester | ||
|
||
# test other tools | ||
other-tester | ||
|
||
# test jevents | ||
make -C jevents | ||
cd jevents | ||
tester | ||
cd .. | ||
|
||
# test perf.data parser | ||
# this requires construct and pandas and some other libraries | ||
# XXX check for missing dependencies | ||
#cd parser | ||
#tester | ||
#cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh | ||
# tester for other programs in pmu-tools | ||
|
||
. ./cpumap.sh | ||
set -e | ||
PERF=${PERF:-perf} | ||
failed() { | ||
echo FAILED | ||
} | ||
PATH=$PATH:. | ||
trap failed ERR 0 | ||
set -x | ||
|
||
# XXX cgroup untested | ||
for args in "" "-A" "--per-socket" "--per-core" "-r2" ; do | ||
|
||
# interval-normalize.py | ||
|
||
${PERF} stat -I100 $args -a -x, -o x.csv sleep 1 | ||
|
||
interval-normalize.py < x.csv | ||
interval-normalize.py < x.csv > y.csv | ||
|
||
grep -q branch-misses,branches,context-switches,cpu-migrations,cycles,instructions,page-faults,stalled-cycles-backend,stalled-cycles-frontend,task-clock y.csv | ||
|
||
# XXX output to file | ||
|
||
# plot-normalized.py | ||
#plot-normalized.py y.csv | ||
|
||
# interval-plot.py | ||
#interval-plot.py < x.csv | ||
|
||
done | ||
|
||
# cputop.py | ||
|
||
cputop.py "socket == 0" | ||
cputop.py "thread == 0 and socket == 0" | ||
cputop.py "thread == 1" offline | ||
cputop.py offline online | ||
[ $(cputop.py True | wc -l | cut -d ' ' -f 1) -eq $(getconf _NPROCESSORS_ONLN) ] | ||
|
||
# list-events.py | ||
|
||
EVENTMAP=${cpus[hsw]} list-events.py > x.lst | ||
[ $(wc -l x.lst | cut -d ' ' -f 1) -gt 20 ] | ||
grep -qi rtm_retired.aborted x.lst | ||
rm x.lst | ||
|
||
# event-translate.py | ||
EVENTMAP=${cpus[hsw]} event-translate.py r4c9 | grep -q rtm_retired.aborted | ||
|
||
# untested: counterdiff.py | ||
|
||
# may need network: | ||
# untested: event_download.py | ||
|
||
# need root: | ||
# untested: msr.py | ||
# untested: pci.py | ||
# untested: event-rmap.py | ||
|
||
trap "" ERR 0 | ||
|
||
echo SUCCEEDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters