summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJames Clark <james.clark@linaro.org>2026-11-06 10:48:10 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-11-07 17:31:38 -0300
commitf6d181fde135e5757c5c94409f510cf42874308b (patch)
tree76b9d78f01d9b6d8f681941df0c5a4dcb216682f /tools/perf/scripts/python
parent8e2287c5df7417a93457548087f45aa11dc2a140 (diff)
perf test: Don't starve per-process tests with system-wide events
Some tests intermittently fail when run in parallel, for example "Check branch stack sampling" fails with no branches recorded at all. The default event is cycles:P which there may only be 1 or 2 HW counters for on Intel because it's precise. System wide or per-core precise events hog the HW counter leaving other per-process tests with no samples. Rather than make all the tests that use default record commands run serially, just make the system wide ones use a software event which has the greatest possible compatibility. They don't need precise sampling or HW counters anyway. The per-process tests can be left alone as their events/processes never run concurrently on any one core. The LBR filter is another resource shared by all events on a CPU, and the system-wide LBR test uses different filters to the per-process branch stack test, so mark the LBR test as exclusive. This fixes the "Check branch stack sampling" test and other flakes when a system-wide record from another test runs at the same time, for example: $ sudo perf record -a -o /dev/null -- sleep 30 & $ sudo perf test -vvv "Check branch stack sampling" ... Testing user branch stack sampling ERROR: Branches missing ^brstack_bench\+[^ ]*/brstack_foo\+[^ ]*/IND_CALL/.*$ ... Testing user branch stack sampling [Failed] ... Testing branch stack filtering permutation (call,CALL|SYSCALL) Testing branch stack filtering [Failed empty script output] ... ---- end(-1) ---- 138: Check branch stack sampling : FAILED! Signed-off-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jakub Brnak <jbrnak@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Leo Yan <leo.yan@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions