[PATCH] Improve io_submit decoding

Dmitry V. Levin ldv at altlinux.org
Sun Apr 24 20:42:21 UTC 2011


On Mon, Apr 11, 2011 at 11:43:13AM -0700, Andi Kleen wrote:
[...]
> Here's an updated patch with ChangeLog.

Sorry for the long delay.

> +				case SUB_VECTOR:
> +					tprintf(", %llx, ", iocb.u.v.offset);
> +					print_common_flags(&iocb);
> +					if (iocb.aio_lio_opcode == IO_CMD_PWRITEV) {
> +						tprint_iov(tcp, iocb.u.v.nr, (unsigned long)iocb.u.v.vec);
> +						break;
> +					}
> +					for (k = 0; k < iocb.u.v.nr; k++) {
> +						struct iovec iov;
> +						tprintf("%s", k == 0 ? "" : ", ");
> +						if (umove(tcp, (unsigned long)iocb.u.v.vec + 
> +                                                                sizeof(struct iovec)*k, &iov))
> +                                                        tprintf("[ ? ]");
> +                                                else
> +                                                        tprintf("[ %p, %lu ]", 
> +                                                                iov.iov_base, 
> +                                                                iov.iov_len);
> +                                        }

It's still unobvious for me why pwritew can be decoded using tprint_iov
but preadv still has to be decoded manually.  Could you explain it, please?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110425/425cb5ab/attachment.bin>


More information about the Strace-devel mailing list