From: Martin Cermak Date: Fri, 23 Dec 2016 16:23:11 +0000 (+0100) Subject: PR20333/io_submit X-Git-Tag: release-3.1~412 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=7f49c8bc77917d408844b695dc5c124c9d729b8e;p=systemtap.git PR20333/io_submit --- diff --git a/tapset/linux/nd_syscalls.stp b/tapset/linux/nd_syscalls.stp index 0cd8632bd..b0649b97e 100644 --- a/tapset/linux/nd_syscalls.stp +++ b/tapset/linux/nd_syscalls.stp @@ -1,33 +1,4 @@ -# io_submit __________________________________________________ -# long sys_io_submit(aio_context_t ctx_id, long nr, struct iocb __user * __user *iocbpp) -# long compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb) -# -probe nd_syscall.io_submit = __nd_syscall.io_submit, - kprobe.function("compat_sys_io_submit") ? -{ - name = "io_submit" - asmlinkage() - ctx_id = ulong_arg(1) - nr = long_arg(2) - iocbpp_uaddr = pointer_arg(3) - argstr = sprintf("%u, %d, %p", ctx_id, nr, iocbpp_uaddr) -} -probe __nd_syscall.io_submit = kprobe.function("sys_io_submit") ? -{ - @__syscall_gate(@const("__NR_io_submit")) -} -probe nd_syscall.io_submit.return = __nd_syscall.io_submit.return, - kprobe.function("compat_sys_io_submit").return ? -{ - name = "io_submit" - retstr = returnstr(1) -} -probe __nd_syscall.io_submit.return = kprobe.function("sys_io_submit").return ? -{ - @__syscall_gate(@const("__NR_io_submit")) -} - # ioprio_get _________________________________________________ # long sys_ioprio_get(int which, int who) # diff --git a/tapset/linux/sysc_io_submit.stp b/tapset/linux/sysc_io_submit.stp new file mode 100644 index 000000000..881c3f626 --- /dev/null +++ b/tapset/linux/sysc_io_submit.stp @@ -0,0 +1,70 @@ +# io_submit __________________________________________________ +# long compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb) +# long sys_io_submit(aio_context_t ctx_id, long nr, struct iocb __user * __user *iocbpp) +# + +@define _SYSCALL_IO_SUBMIT_NAME +%( + name = "io_submit" +%) + +@define _SYSCALL_IO_SUBMIT_ARGSTR +%( + argstr = sprintf("%u, %d, %p", ctx_id, nr, iocbpp_uaddr) +%) + +probe syscall.io_submit = dw_syscall.io_submit !, nd_syscall.io_submit {} +probe syscall.io_submit.return = dw_syscall.io_submit.return !, nd_syscall.io_submit.return {} + +# dw_io_submit _____________________________________________________ + +probe dw_syscall.io_submit = __syscall.io_submit, + kernel.function("compat_sys_io_submit").call ? +{ + @_SYSCALL_IO_SUBMIT_NAME + ctx_id = __ulong($ctx_id) + nr = @__compat_long($nr) + iocbpp_uaddr = @choose_defined($iocbpp, $iocb) + @_SYSCALL_IO_SUBMIT_ARGSTR +} +probe __syscall.io_submit = kernel.function("sys_io_submit").call +{ + @__syscall_gate(@const("__NR_io_submit")) +} +probe dw_syscall.io_submit.return = __syscall.io_submit.return, + kernel.function("compat_sys_io_submit").return ? +{ + @_SYSCALL_IO_SUBMIT_NAME + retstr = return_str(1, $return) +} +probe __syscall.io_submit.return = kernel.function("sys_io_submit").return +{ + @__syscall_gate(@const("__NR_io_submit")) +} + +# nd_io_submit _____________________________________________________ + +probe nd_syscall.io_submit = __nd_syscall.io_submit, + kprobe.function("compat_sys_io_submit") ? +{ + @_SYSCALL_IO_SUBMIT_NAME + asmlinkage() + ctx_id = ulong_arg(1) + nr = long_arg(2) + iocbpp_uaddr = pointer_arg(3) + @_SYSCALL_IO_SUBMIT_ARGSTR +} +probe __nd_syscall.io_submit = kprobe.function("sys_io_submit") ? +{ + @__syscall_gate(@const("__NR_io_submit")) +} +probe nd_syscall.io_submit.return = __nd_syscall.io_submit.return, + kprobe.function("compat_sys_io_submit").return ? +{ + @_SYSCALL_IO_SUBMIT_NAME + retstr = returnstr(1) +} +probe __nd_syscall.io_submit.return = kprobe.function("sys_io_submit").return ? +{ + @__syscall_gate(@const("__NR_io_submit")) +} diff --git a/tapset/linux/syscalls.stp b/tapset/linux/syscalls.stp index 814e036df..861e1f457 100644 --- a/tapset/linux/syscalls.stp +++ b/tapset/linux/syscalls.stp @@ -1,32 +1,4 @@ -# io_submit __________________________________________________ -# long compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb) -# long sys_io_submit(aio_context_t ctx_id, long nr, struct iocb __user * __user *iocbpp) -# -probe syscall.io_submit = __syscall.io_submit, - kernel.function("compat_sys_io_submit").call ? -{ - name = "io_submit" - ctx_id = __ulong($ctx_id) - nr = @__compat_long($nr) - iocbpp_uaddr = @choose_defined($iocbpp, $iocb) - argstr = sprintf("%u, %d, %p", ctx_id, nr, iocbpp_uaddr) -} -probe __syscall.io_submit = kernel.function("sys_io_submit").call -{ - @__syscall_gate(@const("__NR_io_submit")) -} -probe syscall.io_submit.return = __syscall.io_submit.return, - kernel.function("compat_sys_io_submit").return ? -{ - name = "io_submit" - retstr = return_str(1, $return) -} -probe __syscall.io_submit.return = kernel.function("sys_io_submit").return -{ - @__syscall_gate(@const("__NR_io_submit")) -} - # ioprio_get _________________________________________________ # long sys_ioprio_get(int which, int who) #