# published by the Free Software Foundation.
#
+@define IO_CMD_PREADV %( 7 %)
+@define IO_CMD_PWRITEV %( 8 %)
+
probe begin {
println("Tracing started");
}
printf(" iocb[%4d]=%p, fd=%d, opcode=%d, offset=%d, nbytes=%d, buf=%p\n",
i, iocbp, fd, opcode, offset, nbytes, buf)
- for (j = 0; j < nbytes; j++) {
- iovecp = &@cast(buf, "iovec", "kernel")[j]
- base = user_uint64(&@cast(iovecp, "iovec", "kernel")->iov_base)
- len = user_uint32(&@cast(iovecp, "iovec", "kernel")->iov_len)
- printf(" iovec[%4d]=%p, base=%p, len=%d\n",
- j, iovecp, base, len)
+ if (opcode == @IO_CMD_PREADV || opcode == @IO_CMD_PREADV) {
+ for (j = 0; j < nbytes; j++) {
+ iovecp = &@cast(buf, "iovec", "kernel")[j]
+ base = user_uint64(&@cast(iovecp, "iovec", "kernel")->iov_base)
+ len = user_uint32(&@cast(iovecp, "iovec", "kernel")->iov_len)
+ printf(" iovec[%4d]=%p, base=%p, len=%d\n",
+ j, iovecp, base, len)
+ }
}
}
}