summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/bp_account.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/bp_account.c')
-rw-r--r--tools/perf/tests/bp_account.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
index 153624e2d0f5..d0b935356274 100644
--- a/tools/perf/tests/bp_account.c
+++ b/tools/perf/tests/bp_account.c
@@ -10,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;
@@ -191,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
+}
OpenPOWER on IntegriCloud