HardenedBSD/sys/cddl
Mark Johnston 85f7c98d85 sdt: Fix aframe handling after commit ddf0ed09bd
DTrace probes have an "aframes" attribute, used when unwinding the stack
from dtrace_probe().  It counts the number of leading frames to skip
when returning a stack trace, thus is used to hide internal functions.
Commit ddf0ed09bd set the aframes value for SDT probes to 0, which was
correct for an earlier iteration of the patch, but now doesn't take
sdt_probe()/sdt_probe6() into account.

Fix the aframes definition for SDT probes.  Also try to improve
lockstat(1) output by adding an additional aframe for lockstat probes,
which otherwise show internal mtx(9), rwlock(9), etc. functions as the
probe "caller".  This is not quite correct as the number of frames to
skip may differ depending on the lock type and kernel configuration (see
e.g., the MUTEX_NOINLINE kernel option), but this is not a new problem.

Reported by:	mjg
Fixes:	ddf0ed09bd ("sdt: Implement SDT probes using hot-patching")
2024-07-08 11:40:24 -04:00
..
boot/zfs boot/zfs: Sync the definition of dsl_dataset_phys with OpenZFS 2024-06-01 11:12:12 -04:00
compat/opensolaris
contrib/opensolaris
dev sdt: Fix aframe handling after commit ddf0ed09bd 2024-07-08 11:40:24 -04:00