diff options
author | Athira Rajeev <atrajeev@linux.vnet.ibm.com> | 2022-06-10 19:10:48 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-06-29 08:57:42 +1000 |
commit | 2ac05f8f2e4b9068e5bbc0836b35abafd70f02c1 (patch) | |
tree | 4083760eb69f41eca2072a4badf2208b1f248e5b /tools/testing/selftests/sched | |
parent | 9cfd110a36649f9452120a648f15f32d1c82b99d (diff) | |
download | linux-2ac05f8f2e4b9068e5bbc0836b35abafd70f02c1.tar.gz linux-2ac05f8f2e4b9068e5bbc0836b35abafd70f02c1.tar.bz2 linux-2ac05f8f2e4b9068e5bbc0836b35abafd70f02c1.zip |
selftests/powerpc/pmu: Add selftest to check branch stack enablement will not crash on any platforms
While enabling branch stack for an event, BHRB (Branch History
Rolling Buffer) filter is set using bhrb_filter_map() callback.
This callback is not defined for cases like generic_compat_pmu
or in case where there is no PMU registered. A fix was added
in kernel to address a crash issue observed while enabling branch
stack for environments which doesn't have this callback.
commit b460b512417a ("powerpc/perf: Fix crashes with
generic_compat_pmu & BHRB").
Add perf sampling test to exercise this code path and make
sure enabling branch stack shouldn't crash in any platform.
Testcase uses software event cycles since software event is
available and can be used even in cases without PMU.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220610134113.62991-11-atrajeev@linux.vnet.ibm.com
Diffstat (limited to 'tools/testing/selftests/sched')
0 files changed, 0 insertions, 0 deletions