opnsense-src/sys/cddl/dev
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
..
dtmalloc sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dtrace dtrace: Add a partial implementation of dtrace_getarg() on arm64 2024-06-20 12:41:01 -04:00
fbt arm64: Use void pointers for arguments to arm64_get_writable_addr 2024-03-15 10:10:24 -07:00
kinst arm64: Use void pointers for arguments to arm64_get_writable_addr 2024-03-15 10:10:24 -07:00
profile dtrace/profile: Set t_dtrace_trapframe for profile probes 2024-01-07 11:46:13 -05:00
sdt sdt: Fix aframe handling after commit ddf0ed09bd 2024-07-08 11:40:24 -04:00
systrace sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
prototype.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00