NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/59934 CVS commit: src/external/cddl/osnet/dev/sdt



The following reply was made to PR kern/59934; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59934 CVS commit: src/external/cddl/osnet/dev/sdt
Date: Thu, 22 Jan 2026 04:14:09 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Jan 22 04:14:09 UTC 2026
 
 Modified Files:
 	src/external/cddl/osnet/dev/sdt: sdt.c
 
 Log Message:
 dtrace_sdt: Don't ignore the first stack frame in sdt probes.
 
 The aframes argument to dtrace_probe_create gives the number of stack
 frames that are ignored in stack(), the first frame of which is
 `caller'.
 
 This is for, e.g., profiler interrupts where the interrupt frame
 itself isn't interesting; it's the code that was interrupted that was
 interesting (hence profile_aframes = PROF_ARTIFICIAL_FRAMES is often
 nonzero, or even several frames deep).
 
 But for sdt, the direct caller is the interesting part -- when we
 have something like:
 
 foo()
 {
 	...
 	bar();
 	...
 }
 
 bar()
 {
 	...
 	SDT_PROBE1(...);
 	...
 }
 
 We want `caller' to be the return address in bar of SDT_PROBE1(...),
 not the return address in foo of bar().
 
 PR kern/59934: dtrace_sdt: caller is off by a frame
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 src/external/cddl/osnet/dev/sdt/sdt.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index