This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: relate io_submit to io_getevents
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: "Sloot, Hans-Peter" <hans-peter dot sloot at atosorigin dot com>
- Cc: <systemtap at sourceware dot org>
- Date: Wed, 12 Jan 2011 22:05:04 -0500
- Subject: Re: relate io_submit to io_getevents
- References: <1292951208.25655.ezmlm@sourceware.org> <5DA28A19906B13449C35FA295EC9414804D0A99B@aownlex012.europe.nl.intra>
"Sloot, Hans-Peter" <hans-peter.sloot@atosorigin.com> writes:
> [...]
> It seems that parameter 1 is the same for related calls.
>
> io_submit(47052561891328, 1, {{0x2acb475edfe0, 0, 1, 0, 34}}) = 1
> gettimeofday({1294832202, 259883}, NULL) = 0
> io_getevents(47052561891328, 1, 128, {{0x2acb475edfe0, 0x2acb475edfe0,
> 8192, 0}}, {600, 0}) = 1
>
> Is there a way that I can read parameter #1 so that I can relate them?
Certainly. List the probe points and available script/context
variables:
% stap -L 'syscall.io_*'
syscall.io_cancel name:string ctx_id:long iocb_uaddr:long result_uaddr:long argstr:string $ctx_id:aio_context_t $iocb:struct iocb* $result:struct io_event* $__func__:char[] const
syscall.io_destroy name:string ctx:long argstr:string $ctx:aio_context_t $__func__:char[] const
syscall.io_getevents name:string ctx_id:long min_nr:long nr:long events_uaddr:long timeout_uaddr:long timestr:string argstr:string $ctx_id:aio_context_t $min_nr:long int $nr:long int $events:struct io_event* $timeout:struct timespec*
syscall.io_setup name:string maxevents:long ctxp_uaddr:long argstr:string $nr_events:unsigned int $ctxp:aio_context_t* $__func__:char[] const
syscall.io_submit name:string ctx_id:long nr:long iocbpp_uaddr:long argstr:string $ctx_id:aio_context_t $nr:long int $iocbpp:struct iocb**
The ctx and/or ctx_id variables give you that value. (io_destroy
calls it "ctx", inconsistently with the others.) So
% stap -e 'probe syscall.io_submit, syscall.io_getevents {
println(ctx_id) /* or store it into a script global, or whatever */
}'
- FChE