HomeFreeBSD

dtrace: dtrace_getpcstack() tweaks for riscv

Description

dtrace: dtrace_getpcstack() tweaks for riscv

Backtraces for fbt probes are missing the caller's frame. Despite what
the inherited comment claims, we do need to insert this manually on
riscv. In fbt_invop(), set cpu_dtrace_caller to be the return address,
not addr.

We should not increment aframes within this function, since we begin the
main loop by unwinding past the current frame.

Plus some very small comment/style tweaks.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37661

(cherry picked from commit cdfa49f2584ac174648ced04d76a47ad6773f2f0)

Details

Provenance
mhorneAuthored on Jan 11 2023, 6:06 PM
Differential Revision
D37661: dtrace: dtrace_getpcstack() tweaks for riscv
Parents
rG9534ea54cfa1: dtrace: remove unused defines
Branches
Unknown
Tags
Unknown