perf: tests: Disable breakpoint tests on ARM (32-bit)
PATCH v3 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 and update the comment above to explain these limitations.
---
Changes in v3:
- directly incorporate Will's comment, Will can you add your Signed-off-by?
Changes in v2:
- incorporate Will's feedback about comment
tools/perf/tests/bp_signal.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
tools/perf/tests/bp_signal.c +14 -6
@@ -291,12 +291,20 @@ int test__bp_signal(struct test *test __maybe_unused, int subtest __maybe_unusedbool test__bp_signal_is_supported (void ) { -/* -* The powerpc so far does not have support to even create -* instruction breakpoint using the perf event interface. -* Once it's there we can release this. -*/ -#if defined(__powerpc__) || defined(__s390x__) +/* +* PowerPC and S390 do not support creation of instruction +* breakpoints using the perf_event interface. +* +* ARM requires explicit rounding down of the instruction +* pointer in Thumb mode, and then requires the single-step +* to be handled explicitly in the overflow handler to avoid +* stepping into the SIGIO handler and getting stuck on the +* breakpointed instruction. +* +* Just disable the test for these architectures until these +* issues are resolved. +*/ +#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__)return false;#else return true;
Signature · 1 line
2.17.1
Quoted 14 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_breakpointinfrastructure. 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 and update the comment above to explain these limitations.
Quoted 6 lines
Signed-off-by Florian Fainelli <[email protected]>---
Changes in v3:- directly incorporate Will's comment, Will can you add your Signed-off-by?
Of course:
Will
Arnaldo Carvalho de Melo
maintainerEm Tue, Dec 04, 2018 at 02:06:16PM +0000, Will Deacon escreveu:
Quoted 19 lines · Florian Fainelli
Quoted 18 lines
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_breakpointinfrastructure. 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 and update the comment above to explain these limitations.
Signed-off-by Florian Fainelli <[email protected]>---
Changes in v3:
Quoted 7 lines
Quoted 2 lines
- directly incorporate Will's comment, Will can you add your Signed-off-by?
Of course:
Co-developed-by Will Deacon <[email protected]>Signed-off-by Will Deacon <[email protected]>
Thanks, added those and applied the patch.
- Arnaldo
tip-bot for Florian Fainelli
merge bot[tip:perf/core] perf tests ARM: Disable breakpoint tests 32-bit
In reply to Florian Fainelliperf tests ARM: Disable breakpoint tests 32-bit
Commit-ID: b4ab1b4fa1995ceb1b7ba9d1b51a5124d28c5f0f Gitweb: https://git.kernel.org/tip/b4ab1b4fa1995ceb1b7ba9d1b51a5124d28c5f0f Author: Florian Fainelli <[email protected]> AuthorDate: Mon, 3 Dec 2018 11:11:36 -0800 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 6 Dec 2018 14:12:21 -0300
perf tests ARM: Disable breakpoint tests 32-bit
The 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 and update the comment above to explain these limitations.
--- tools/perf/tests/bp_signal.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
tools/perf/tests/bp_signal.c +14 -6
@@ -291,12 +291,20 @@ int test__bp_signal(struct test *test __maybe_unused, int subtest __maybe_unusedbool test__bp_signal_is_supported (void ) { -/* -* The powerpc so far does not have support to even create -* instruction breakpoint using the perf event interface. -* Once it's there we can release this. -*/ -#if defined(__powerpc__) || defined(__s390x__) +/* +* PowerPC and S390 do not support creation of instruction +* breakpoints using the perf_event interface. +* +* ARM requires explicit rounding down of the instruction +* pointer in Thumb mode, and then requires the single-step +* to be handled explicitly in the overflow handler to avoid +* stepping into the SIGIO handler and getting stuck on the +* breakpointed instruction. +* +* Just disable the test for these architectures until these +* issues are resolved. +*/ +#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__)return false;#else return true;
tip-bot for Florian Fainelli
merge bot[tip:perf/core] perf tests ARM: Disable breakpoint tests 32-bit
In reply to Florian Fainelliperf tests ARM: Disable breakpoint tests 32-bit
Commit-ID: 24f967337f6d6bce931425769c0f5ff5cf2d212e Gitweb: https://git.kernel.org/tip/24f967337f6d6bce931425769c0f5ff5cf2d212e Author: Florian Fainelli <[email protected]> AuthorDate: Mon, 3 Dec 2018 11:11:36 -0800 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 17 Dec 2018 14:56:27 -0300
perf tests ARM: Disable breakpoint tests 32-bit
The 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 and update the comment above to explain these limitations.
--- tools/perf/tests/bp_signal.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
tools/perf/tests/bp_signal.c +14 -6
@@ -291,12 +291,20 @@ int test__bp_signal(struct test *test __maybe_unused, int subtest __maybe_unusedbool test__bp_signal_is_supported (void ) { -/* -* The powerpc so far does not have support to even create -* instruction breakpoint using the perf event interface. -* Once it's there we can release this. -*/ -#if defined(__powerpc__) || defined(__s390x__) +/* +* PowerPC and S390 do not support creation of instruction +* breakpoints using the perf_event interface. +* +* ARM requires explicit rounding down of the instruction +* pointer in Thumb mode, and then requires the single-step +* to be handled explicitly in the overflow handler to avoid +* stepping into the SIGIO handler and getting stuck on the +* breakpointed instruction. +* +* Just disable the test for these architectures until these +* issues are resolved. +*/ +#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__)return false;#else return true;