[PATCH] Improve io_submit decoding

Dmitry V. Levin ldv at altlinux.org
Sat Apr 9 21:32:55 UTC 2011


On Thu, Apr 07, 2011 at 10:07:15PM -0700, Andi Kleen wrote:
> The io_submit handler didn't show a lot of the important information
> in iocb passed to io_submit, like how much This patch improves this.

Thanks.  Would you like to write a commit message for the patch?

[...]
> Also I was wondering if configure should error out when libaio-devel
> is not installed. Right now when it's not there the code is just
> silently stubbed out. At least the SUSE rpm has exactly this problem.

The easy fix is to add a #warning.
A bit more complicated approach is to implement --enable/--disable
configure switch for libaio-devel, and error out if --enable is requested
but libaio-devel is not available.

[...]
> +				case SUB_VECTOR:
> +					tprintf(", %llx, ", iocb.u.v.offset);
> +					print_common_flags(&iocb);
> +					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);
> +					}
> +					break;

Please use tprint_iov() to decode iovec arrays if appropriate.


-- 
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/20110410/e571a432/attachment.bin>


More information about the Strace-devel mailing list