mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
perf test stat: Update test expectations and events
test_stat_record_report and test_stat_record_script used default output which triggers a bug when sending metrics. As this isn't relevant to the test switch to using named software events. Update the match in test_hybrid as the cycles event is now cpu-cycles to workaround potential ARM issues. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
6b76f0678b
commit
a48cd551d7
|
|
@ -18,7 +18,7 @@ test_default_stat() {
|
|||
|
||||
test_stat_record_report() {
|
||||
echo "stat record and report test"
|
||||
if ! perf stat record -o - true | perf stat report -i - 2>&1 | \
|
||||
if ! perf stat record -e task-clock -o - true | perf stat report -i - 2>&1 | \
|
||||
grep -E -q "Performance counter stats for 'pipe':"
|
||||
then
|
||||
echo "stat record and report test [Failed]"
|
||||
|
|
@ -30,7 +30,7 @@ test_stat_record_report() {
|
|||
|
||||
test_stat_record_script() {
|
||||
echo "stat record and script test"
|
||||
if ! perf stat record -o - true | perf script -i - 2>&1 | \
|
||||
if ! perf stat record -e task-clock -o - true | perf script -i - 2>&1 | \
|
||||
grep -E -q "CPU[[:space:]]+THREAD[[:space:]]+VAL[[:space:]]+ENA[[:space:]]+RUN[[:space:]]+TIME[[:space:]]+EVENT"
|
||||
then
|
||||
echo "stat record and script test [Failed]"
|
||||
|
|
@ -196,7 +196,7 @@ test_hybrid() {
|
|||
fi
|
||||
|
||||
# Run default Perf stat
|
||||
cycles_events=$(perf stat -- true 2>&1 | grep -E "/cycles/[uH]*| cycles[:uH]* " -c)
|
||||
cycles_events=$(perf stat -a -- sleep 0.1 2>&1 | grep -E "/cpu-cycles/[uH]*| cpu-cycles[:uH]* " -c)
|
||||
|
||||
# The expectation is that default output will have a cycles events on each
|
||||
# hybrid PMU. In situations with no cycles PMU events, like virtualized, this
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user