From nobody Fri Nov 14 14:27:04 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 4d7KGK0xK9z6GWFr; Fri, 14 Nov 2025 14:27:05 +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 4d7KGK0MCkz3Q6W; Fri, 14 Nov 2025 14:27:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130425; 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=rLdXKhwVaxdGlzSaGEwTHhacHqywfb4UzCkXyt2PMBA=; b=h0VhbyxtpFU1Rj2uCXp2tOys07a+aMfvWtUlGG0bbsZ2TvziOsT+YKrBaRLVRCB0i974Gb W0ICcM1sga5KS6nJoISFedBbP3Z6ttgbyCfasXMhTgSTJ96RtS77Yi1jK8KxJPWFU2c905 jSOfTwkS/jFaOOWVDIq/DLEYRp4UANz1uiaZZOyD/RiYFOCO14uGe1lkCz9QfRIz+VBViK ACdRlQpCLYvKT+6IcclwYeR+JHfisssGFcZ4zdPSMZ/T2mjKtoU8iiYv0PHBK0oogc5Q6X 1ntllWISJ8/va3cGXCzPz8iGkHPYT08mswxM/9QtLmMHLVuhdfTddz+coLik1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130425; 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=rLdXKhwVaxdGlzSaGEwTHhacHqywfb4UzCkXyt2PMBA=; b=OYwY4pENz3bY++hJf+9VRNAuDDyZJqqpjjOC9azoamU4UP58yFo6orZkfkMZduWyR2Unsv 1T1mpv/NySwzZ3Qh0UJLBBzqf9dkYmTRilX3i5v/0Ojo26DQmZu/qofA//yHNyI8+DHM8H PA3LaMQ4TyuxsQxWBLsdMlApnAaFOBIW7VulmLU9DN8D0DC5naY/Bj0PYpALm4RKlfnB0g 3gJj15a1lZcwanouw0SZ/EUlkcmPJEZO7Tplsux8I5HiiHXh9maJWLS1XfNHU4FU9L0yUT fjyh/0arqbtykkbSO0F4S7ryAI+WuSalFIHoBKXS9lCnP5Mizh3k1cmYcdSrQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763130425; a=rsa-sha256; cv=none; b=UGu4TOINflKF9sp0uS10OCWhBChRrqzCeQyF6m4xLpAzE1QTS9y4QVKPvU1ccqWBxwWKsj AmXH1ieXAIHEE+Uti3VpHOTTJcgOOYTGDGsfttj/aCj84j1+5766oI4dis699udUQ0L6/F mueSEh+wjU1Jzw6GZwH498y5qhkEfiEu1OBSb9mmwqOJs1W82ALLhw3u6VcOiGWhJA68oP Z1TuchlCF/dM5zj+xblcNzB6NQV2/w4IwYOYfxe2F3il/+LUgj5Qubg2pXWsmKJyQEmW3U Uo3s1JQGTqUcI4RuAxKKgna3bIQkjHrAfoFEaaRJsyXt34tzF+z06i+QzRB3ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KGJ6znJz198J; Fri, 14 Nov 2025 14:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AEER4mB038199; Fri, 14 Nov 2025 14:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEER489038196; Fri, 14 Nov 2025 14:27:04 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:27:04 GMT Message-Id: <202511141427.5AEER489038196@gitrepo.freebsd.org> 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: 2bce3c9fcd57 - stable/15 - dtrace_io.4: Use bio_length instead of bio_bcount in examples 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: 2bce3c9fcd574654681a81a23e31eca991815686 Auto-Submitted: auto-generated The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=2bce3c9fcd574654681a81a23e31eca991815686 commit 2bce3c9fcd574654681a81a23e31eca991815686 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-10-26 16:52:11 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-11-14 14:27:01 +0000 dtrace_io.4: Use bio_length instead of bio_bcount in examples Tracing bio_bcount makes little sense for some devices like for example md(4), as it is set to "0" instead of to the actual I/O length. markj@ suggested the following DTrace one-liner to identify some cases where bio_length is set but bio_bcount is not: dtrace -n 'io:::start /args[0]->bio_length != args[0]->bio_bcount/{printf("%d %d", args[0]->bio_length, args[0]->bio_bcount); stack();}' For future reference in the context of bio_length vs bio_bcount, phk@ mentioned in the code review that: > the original intent was to get rid of of bio_bcount Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53365 (cherry picked from commit db25448ab9ffa8bfe52d852674cc466494b849d1) --- share/man/man4/dtrace_io.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/dtrace_io.4 b/share/man/man4/dtrace_io.4 index 30ec44768fbf..1699cebab8e9 100644 --- a/share/man/man4/dtrace_io.4 +++ b/share/man/man4/dtrace_io.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2015 +.Dd October 26, 2025 .Dt DTRACE_IO 4 .Os .Sh NAME @@ -84,7 +84,7 @@ The following script shows a per-process breakdown of total I/O by disk device: io:::start { - @[args[1]->device_name, execname, pid] = sum(args[0]->bio_bcount); + @[args[1]->device_name, execname, pid] = sum(args[0]->bio_length); } END