diff options
Diffstat (limited to 'tools/perf/tests/bp_account.c')
-rw-r--r-- | tools/perf/tests/bp_account.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index 57fc544aedb0..d0b935356274 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu. @@ -9,16 +10,13 @@ #include <unistd.h> #include <string.h> #include <sys/ioctl.h> -#include <time.h> #include <fcntl.h> -#include <signal.h> -#include <sys/mman.h> -#include <linux/compiler.h> #include <linux/hw_breakpoint.h> #include "tests.h" #include "debug.h" -#include "perf.h" +#include "event.h" +#include "../perf-sys.h" #include "cloexec.h" volatile long the_var; @@ -190,3 +188,19 @@ int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_un return bp_accounting(wp_cnt, share); } + +bool test__bp_account_is_supported(void) +{ + /* + * PowerPC and S390 do not support creation of instruction + * breakpoints using the perf_event interface. + * + * Just disable the test for these architectures until these + * issues are resolved. + */ +#if defined(__powerpc__) || defined(__s390x__) + return false; +#else + return true; +#endif +} |