Source-Changes archive

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

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



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