From nobody Tue Nov 18 13:34:25 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d9lvj6n1kz6H7vD for ; Tue, 18 Nov 2025 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d9lvj21x9z3m8s for ; Tue, 18 Nov 2025 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763472865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QlVjl4wyuaNy8PIaMIKoKdhRRUh2FllIVGAxO7+xuho=; b=EHAtyTqh+ky1cwu7SBtEA2zdKu88NcLLaWuE2rp+mDPnIq2hUTN3oFfokz/uoekfroNWQs Sg2hkhaO7kf3SOpbKWGYJ+ebMdS+HyyyNbYFoW4z1Fcq4wj9E5voj5LZAZ7oRngRQxMJ4Z 6xdM0hPxDUI9b1ASniuoqYuyEn6zX9etdO7+/b59OCARtPXwE6dMkBw6G3qzIjRor96KJn WJOyENt5Ls46HWgMzHdUXMgvme1KyIMdtTSyS9+28we+GpqD7HSwMwqhZqQ7WCk/ZkMTux mae/pUPrb7db1nc33iE7QuiceRsrY/LFcRm6ApCVf4VGI+t/0sneThpbjZxIyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763472865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QlVjl4wyuaNy8PIaMIKoKdhRRUh2FllIVGAxO7+xuho=; b=f/PIKDYKQAm/Qmnk1B54wFVV9mSWA7pWY6L4ivPJDqBsmZ29LZMEstgWJEGeZXW5XzHPFe l13w+pF3/FuKTo/JBfbzfb7Hrrxadsg4hUluTBOqTqml/nZoQs0ZYPOrhgIh3T3DZDdzIV ANbktxKk9ZmTj5A3G9a8s6waQseV/ttUUDJ16Gjel3NfA3Ufr99bjpVhYzxdPuLwlh9Aa5 CxhFV/JPNKq2TaPhy/QPQVWhJ6j2s1g9q4sf1iOs9PLijP5JWfCjkC6Bx3osEMw4xKP58L L43JpgDbdsEBPAhaHq2e1WJdl0gxLhHZDxF1iZW11dSZSU2OEIJePTQJ+Fw7Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763472865; a=rsa-sha256; cv=none; b=q0BIKQ+zQ+FGInORDSbpEf2sgaX7STeLWqXUk5DRr8nZb8OHF0Kv5pyt1uC+2xXiZkGt3Y c3v0CC6QsdNTT82t5udV608YW0SQ0X+RJdBEiGeZoEBcgMrIDYPOhpW3+az8E+iYwoIF4u H9MayD9WCTRwsgLzPUr8f3fRpQ2roSfch4HqfNMr3vin/EIcBiq4ka/q/LnGVg8BPd9bbW EWpKGz29oZ221swljkZ5vMmpIIi9+gg4bDSyp3XfA/5DYl9Q30tiGPu7iIIiGpYmJ0izF+ zE1knR5DAeE79Aq2LmPt8pqajmk1LdvQnNGIgFo/34KsHjRS7TfeXVwrxIYFBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4d9lvj0zk5zx8K for ; Tue, 18 Nov 2025 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ee39 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 18 Nov 2025 13:34:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 443b7c41d619 - stable/15 - dtrace_callout_execute.4: Document the DTrace callout_execute provider List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 443b7c41d619412e2d149423b3c5d0d9b11bf4ae Auto-Submitted: auto-generated Date: Tue, 18 Nov 2025 13:34:25 +0000 Message-Id: <691c75e1.2ee39.11b6f8c9@gitrepo.freebsd.org> The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=443b7c41d619412e2d149423b3c5d0d9b11bf4ae commit 443b7c41d619412e2d149423b3c5d0d9b11bf4ae 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:34:19 +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 2e7eeeadb86b..6b0c3d3c2dee 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -1300,6 +1300,7 @@ in .Xr cpp 1 , .Xr dwatch 1 , .Xr dtrace_audit 4 , +.Xr dtrace_callout_execute 4 , .Xr dtrace_dtrace 4 , .Xr dtrace_fbt 4 , .Xr dtrace_io 4 , diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 35cc6bbb8da8..dd98badd31ba 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1003,6 +1003,7 @@ _ccd.4= ccd.4 .if ${MK_CDDL} != "no" _dtrace_provs= dtrace_audit.4 \ + dtrace_callout_execute.4 \ dtrace_dtrace.4 \ dtrace_fbt.4 \ dtrace_io.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 0e59ef8ab2b1..637049ec1ef5 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 January 22, 2024 +.Dd November 4, 2025 .Dt CALLOUT 9 .Os .Sh NAME @@ -789,6 +789,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