git: 7d43404485bf - stable/14 - dtrace_callout_execute.4: Document the DTrace callout_execute provider
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Nov 2025 13:36:00 UTC
The branch stable/14 has been updated by 0mp:
URL: https://cgit.FreeBSD.org/src/commit/?id=7d43404485bf2e306e54bdfdb0ae937d6921df39
commit 7d43404485bf2e306e54bdfdb0ae937d6921df39
Author: Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2025-11-04 11:10:55 +0000
Commit: Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2025-11-18 13:35:54 +0000
dtrace_callout_execute.4: Document the DTrace callout_execute provider
MFC after: 2 weeks
Fixes: 91dd9aae1ab8 Add explicit static DTrace tracing to the callout mechanism
Differential Revision: https://reviews.freebsd.org/D51397
(cherry picked from commit 3ccb2d9513e6a2e046e635c186da68acf8f8498b)
---
cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 1 +
share/man/man4/Makefile | 1 +
share/man/man4/dtrace_callout_execute.4 | 68 ++++++++++++++++++++++++++++
share/man/man9/callout.9 | 4 +-
4 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
index 68b3a7f5f9bc..ce01b2c4c017 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
+++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
@@ -1299,6 +1299,7 @@ in
.Sh SEE ALSO
.Xr cpp 1 ,
.Xr dtrace_audit 4 ,
+.Xr dtrace_callout_execute 4 ,
.Xr dtrace_fbt 4 ,
.Xr dtrace_io 4 ,
.Xr dtrace_ip 4 ,
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 627ca85d1fff..2dda6b937dc2 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -939,6 +939,7 @@ _ccd.4= ccd.4
.if ${MK_CDDL} != "no"
_dtrace_provs= dtrace_audit.4 \
+ dtrace_callout_execute.4 \
dtrace_fbt.4 \
dtrace_io.4 \
dtrace_ip.4 \
diff --git a/share/man/man4/dtrace_callout_execute.4 b/share/man/man4/dtrace_callout_execute.4
new file mode 100644
index 000000000000..1154ed066b97
--- /dev/null
+++ b/share/man/man4/dtrace_callout_execute.4
@@ -0,0 +1,68 @@
+.\"
+.\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org>
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd November 4, 2025
+.Dt DTRACE_CALLOUT_EXECUTE 4
+.Os
+.Sh NAME
+.Nm dtrace_callout_execute
+.Nd a DTrace provider for the callout API
+.Sh SYNOPSIS
+.Nm callout_execute Ns Cm :kernel::callout_start
+.Nm callout_execute Ns Cm :kernel::callout_end
+.Sh DESCRIPTION
+The
+.Nm callout_execute
+provider allows for tracing the
+.Xr callout 9
+mechanism.
+.Pp
+The
+.Nm callout_execute Ns Cm :kernel::callout_start
+probe fires just before a callout.
+.Pp
+The
+.Nm callout_execute Ns Cm :kernel::callout_end
+probe fires right after a callout.
+.Pp
+The only argument to the
+.Nm callout_execute
+probes,
+.Fa args[0] ,
+is a callout handler
+.Ft struct callout *
+of the invoked callout.
+.Sh EXAMPLES
+.Ss Example 1: Graph of Callout Execution Time
+The following
+.Xr d 7
+script generates a distribution graph of
+.Xr callout 9
+execution times:
+.Bd -literal -offset 2n
+callout_execute:::callout_start
+{
+ self->cstart = timestamp;
+}
+
+callout_execute:::callout_end
+{
+ @length = quantize(timestamp - self->cstart);
+}
+.Ed
+.Sh SEE ALSO
+.Xr dtrace 1 ,
+.Xr tracing 7 ,
+.Xr callout 9 ,
+.Xr SDT 9
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm callout_execute
+provider was written by
+.An Robert N. M. Watson Aq Mt rwatson@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org .
diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9
index 96b93283bfc2..97d9f4138742 100644
--- a/share/man/man9/callout.9
+++ b/share/man/man9/callout.9
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd September 1, 2021
+.Dd November 4, 2025
.Dt CALLOUT 9
.Os
.Sh NAME
@@ -816,6 +816,8 @@ and
functions return a value of one if the callout was still pending when it was
called, a zero if the callout could not be stopped and a negative one is it
was either not running or has already completed.
+.Sh SEE ALSO
+.Xr dtrace_callout_execute 4
.Sh HISTORY
.Fx
initially used the long standing