opnsense-src/sys/cddl/dev/dtrace
Jessica Clarke 05985a7f80 arm64: Improve DDB backtrace support
The existing implementation relies on each trap handler saving a normal
stack frame record, which is a waste of time and space when we're
already saving a trapframe to the stack. It's also wrong as it currently
saves LR not ELR.

Instead of patching it up, rewrite it based on the RISC-V implementation
with inspiration from the amd64 implementation for how to handle
vectored traps to provide an improved implementation. This includes
compressing the information down to one line like other architectures
rather than the highly-verbose old form that repeats itself by printing
LR and FP in one frame only to print them as PC and SP in the next. It
also includes printing out actually useful information about the traps
that occurred, though FAR is not saved in the trapframe so we cannot
print it (in general it can be clobbered between when the trap happened
and now), only ESR.

The AAPCS also allows the stack frame record to be located anywhere in
the frame, not just the top, so the caller's SP is not at a fixed offset
from the callee's FP like on almost all other architectures in
existence. This means there is no way to derive the caller's SP in the
unwinder, and so we have to drop that bit of (unused) state everywhere.

Reviewed by:	jhb, markj
Differential Revision:	https://reviews.freebsd.org/D28026
2021-02-01 14:15:57 +00:00
..
aarch64 arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
amd64 Fix syntax 2020-12-01 22:44:23 +00:00
arm Changes that improve DTrace FBT reliability on freebsd/arm64: 2021-01-11 15:42:22 +00:00
i386 Fix syntax 2020-12-01 23:51:48 +00:00
mips Handle non-dtrace-triggered kernel breakpoint traps in mips. 2020-04-21 17:38:07 +00:00
powerpc powerpc/dtrace: Actually fix stack traces 2019-05-17 19:57:08 +00:00
riscv riscv: fix kernel build 2021-01-15 11:57:04 -04:00
x86 Sync the x86 dis_tables.c with upstream. 2017-02-03 03:22:47 +00:00
dtrace_anon.c
dtrace_cddl.h Fix a tracepoint lookup race in fasttrap_pid_probe(). 2019-02-21 22:54:17 +00:00
dtrace_debug.c Fix a backwards comparison in the code to dump a DTrace debug buffer. 2017-03-13 18:43:00 +00:00
dtrace_hacks.c Fix DTrace's panic() action. 2015-04-24 03:19:30 +00:00
dtrace_ioctl.c Don't use pcpu_find() to determine if a CPU ID is valid. 2017-11-27 18:42:23 +00:00
dtrace_load.c Fix a harmless LOR in dtrace_load(). 2017-05-01 17:01:00 +00:00
dtrace_modevent.c
dtrace_sysctl.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
dtrace_test.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
dtrace_unload.c MFV r266993: 2015-02-03 19:39:53 +00:00
dtrace_vtime.c