mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
selftests/powerpc/ptrace: Update ptrace-perf watchpoint selftest
Now that ptrace and perf are no longer exclusive, update the test to exercise interesting interactions. An assembly file is used for the children to allow precise instruction choice and addresses, while avoiding any compiler quirks. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230801011744.153973-7-bgray@linux.ibm.com
This commit is contained in:
parent
bd29813ae1
commit
58709f6fc3
@ -36,6 +36,7 @@ $(TM_TESTS): CFLAGS += -I../tm -mhtm
|
||||
CFLAGS += $(KHDR_INCLUDES) -fno-pie
|
||||
|
||||
$(OUTPUT)/ptrace-gpr: ptrace-gpr.S
|
||||
$(OUTPUT)/ptrace-perf-hwbreak: ptrace-perf-asm.S
|
||||
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
|
||||
|
||||
$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S
|
||||
|
33
tools/testing/selftests/powerpc/ptrace/ptrace-perf-asm.S
Normal file
33
tools/testing/selftests/powerpc/ptrace/ptrace-perf-asm.S
Normal file
@ -0,0 +1,33 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <ppc-asm.h>
|
||||
|
||||
.global same_watch_addr_load
|
||||
.global same_watch_addr_trap
|
||||
|
||||
FUNC_START(same_watch_addr_child)
|
||||
nop
|
||||
same_watch_addr_load:
|
||||
ld 0,0(3)
|
||||
nop
|
||||
same_watch_addr_trap:
|
||||
trap
|
||||
blr
|
||||
FUNC_END(same_watch_addr_child)
|
||||
|
||||
|
||||
.global perf_then_ptrace_load1
|
||||
.global perf_then_ptrace_load2
|
||||
.global perf_then_ptrace_trap
|
||||
|
||||
FUNC_START(perf_then_ptrace_child)
|
||||
nop
|
||||
perf_then_ptrace_load1:
|
||||
ld 0,0(3)
|
||||
perf_then_ptrace_load2:
|
||||
ld 0,0(4)
|
||||
nop
|
||||
perf_then_ptrace_trap:
|
||||
trap
|
||||
blr
|
||||
FUNC_END(perf_then_ptrace_child)
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user