Source-Changes archive

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

CVS commit: [netbsd-10] src/external/cddl/osnet/dev/sdt



Module Name:    src
Committed By:   martin
Date:           Mon Jan 26 12:25:56 UTC 2026

Modified Files:
        src/external/cddl/osnet/dev/sdt [netbsd-10]: sdt.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1229):

        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.24 -r1.24.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