NetBSD-Bugs archive

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

PR/59934 CVS commit: [netbsd-9] src/external/cddl/osnet/dev/sdt



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

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59934 CVS commit: [netbsd-9] src/external/cddl/osnet/dev/sdt
Date: Mon, 26 Jan 2026 12:31:31 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Jan 26 12:31:31 UTC 2026
 
 Modified Files:
 	src/external/cddl/osnet/dev/sdt [netbsd-9]: sdt.c
 
 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #2000):
 
 	external/cddl/osnet/dev/sdt/sdt.c: revision 1.25
 
 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.20 -r1.20.2.1 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