aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2025-10-26 16:52:11 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2025-10-31 15:52:20 +0000
commitdb25448ab9ffa8bfe52d852674cc466494b849d1 (patch)
treed983893382c0890991a7e46666de0300ab3497b7
parentbd27bd1f51d049538cc7a0053be9d99110a53ae1 (diff)
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
-rw-r--r--share/man/man4/dtrace_io.44
1 files 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