Skip to contentSkip to conversation

perf: tests: Disable breakpoint tests on ARM (32-bit)

PATCH Superseded Florian Fainelli 2 participants 2 messages Nov 16, 2018 – Nov 20, 2018 perf events

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: tests: Disable breakpoint tests on ARM (32-bit)

breakpoint tests on the ARM 32-bit kernel are broken in several ways.

The breakpoint length requested does not necessarily match whether the function address has the Thumb bit (bit 0) set or not, and this does matter to the ARM kernel hw_breakpoint infrastructure. See [1] for background.

[1]: https://lkml.org/lkml/2018/11/15/205

As Will indicated, the overflow handling would require single-stepping which is not supported at the moment. Just disable those tests for the ARM 32-bit platforms.

---
 tools/perf/tests/bp_signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/bp_signal.c +1 -1
index a467615c5a0e..3b5471ea2331 100644
@@ -296,7 +296,7 @@ bool test__bp_signal_is_supported(void)
  * instruction breakpoint using the perf event interface.
  * Once it's there we can release this.
  */
-#if defined(__powerpc__) || defined(__s390x__)
+#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__)
 	return false;
 #else
 	return true;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 23 lines · Florian Fainelli

breakpoint tests on the ARM 32-bit kernel are broken in several ways.

The breakpoint length requested does not necessarily match whether the function address has the Thumb bit (bit 0) set or not, and this does matter to the ARM kernel hw_breakpoint infrastructure. See [1] for background.

[1]: https://lkml.org/lkml/2018/11/15/205

As Will indicated, the overflow handling would require single-stepping which is not supported at the moment. Just disable those tests for the ARM 32-bit platforms.

---
 tools/perf/tests/bp_signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/bp_signal.c +0 -0
index a467615c5a0e..3b5471ea2331 100644

tools/perf/tests/bp_signal.c bool test__bp_signal_is_supported(void) · line 301

Quoted 7 lines
tools/perf/tests/bp_signal.c +1 -1
@@ -296,7 +296,7 @@ bool test__bp_signal_is_supported(void)
  * instruction breakpoint using the perf event interface.
  * Once it's there we can release this.
  */
-#if defined(__powerpc__) || defined(__s390x__)
+#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__)
 	return false;
 #else

I'm ok with disabling the test, but the comment above this #if is all about powerpc.

Will