[PATCH v2 6/6] perf test: Make watchpoint data 32-bits on i386
From: Ian Rogers
Date: Wed Sep 04 2024 - 01:07:43 EST
i386 only supports watchpoints up to size 4, 8 bytes causes extra
counts and test failures.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/tests/wp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/tests/wp.c b/tools/perf/tests/wp.c
index cc8719609b19..6c178985e37f 100644
--- a/tools/perf/tests/wp.c
+++ b/tools/perf/tests/wp.c
@@ -20,7 +20,12 @@ do { \
TEST_ASSERT_VAL(text, count == val); \
} while (0)
+#ifdef __i386__
+/* Only breakpoint length less-than 8 has hardware support on i386. */
+volatile u32 data1;
+#else
volatile u64 data1;
+#endif
volatile u8 data2[3];
#ifndef __s390x__
--
2.46.0.469.g59c65b2a67-goog