We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2adbf53 commit f9c506fCopy full SHA for f9c506f
tools/perf/tests/shell/stat.sh
@@ -187,7 +187,11 @@ test_hybrid() {
187
# Run default Perf stat
188
cycles_events=$(perf stat -- true 2>&1 | grep -E "/cycles/[uH]*| cycles[:uH]* " -c)
189
190
- if [ "$pmus" -ne "$cycles_events" ]
+ # The expectation is that default output will have a cycles events on each
191
+ # hybrid PMU. In situations with no cycles PMU events, like virtualized, this
192
+ # can fall back to task-clock and so the end count may be 0. Fail if neither
193
+ # condition holds.
194
+ if [ "$pmus" -ne "$cycles_events" ] && [ "0" -ne "$cycles_events" ]
195
then
196
echo "hybrid test [Found $pmus PMUs but $cycles_events cycles events. Failed]"
197
err=1
0 commit comments