]> sourceware.org Git - systemtap.git/commitdiff
PR20333/exit_group
authorMartin Cermak <mcermak@redhat.com>
Thu, 22 Dec 2016 16:12:39 +0000 (17:12 +0100)
committerMartin Cermak <mcermak@redhat.com>
Thu, 22 Dec 2016 16:12:39 +0000 (17:12 +0100)
tapset/linux/nd_syscalls.stp
tapset/linux/sysc_exit_group.stp [new file with mode: 0644]
tapset/linux/syscalls.stp

index 6671eb23761dc51014a2558c17990205ca4e8776..62b5708ec91a67cd7ad2b84a28d257a0a8df3519 100644 (file)
@@ -1,18 +1,4 @@
 
-# exit_group _________________________________________________
-# void sys_exit_group(int error_code)
-#
-probe nd_syscall.exit_group = kprobe.function("sys_exit_group").call ?
-{
-       name = "exit_group"
-       asmlinkage()
-       status = int_arg(1)
-       argstr = sprint(status)
-}
-# sys_exit_group() never returns, and is blacklisted for return probes,
-# so no alias here.  See bz6588.
-# NB: the explicit .call ensures that alias suffixes can't infer .return
-
 # faccessat __________________________________________________
 # new function with 2.6.16
 # long sys_faccessat(int dfd, const char __user *filename, int mode)
diff --git a/tapset/linux/sysc_exit_group.stp b/tapset/linux/sysc_exit_group.stp
new file mode 100644 (file)
index 0000000..c011b19
--- /dev/null
@@ -0,0 +1,38 @@
+# exit_group _________________________________________________
+# void sys_exit_group(int error_code)
+#
+# sys_exit_group() never returns, and is blacklisted for return probes,
+# so no alias here.  See bz6588.
+# NB: the explicit .call ensures that alias suffixes can't infer .return
+
+@define _SYSCALL_EXIT_GROUP_NAME
+%(
+       name = "exit_group"
+%)
+
+@define _SYSCALL_EXIT_GROUP_ARGSTR
+%(
+       argstr = sprint(status)
+%)
+
+probe syscall.exit_group = dw_syscall.exit_group !, nd_syscall.exit_group {}
+probe syscall.exit_group.return = dw_syscall.exit_group.return !, nd_syscall.exit_group.return {}
+
+# dw_exit_group _____________________________________________________
+
+probe dw_syscall.exit_group = kernel.function("sys_exit_group").call
+{
+       @_SYSCALL_EXIT_GROUP_NAME
+       status = __int32($error_code)
+       @_SYSCALL_EXIT_GROUP_ARGSTR
+}
+
+# nd_exit_group _____________________________________________________
+
+probe nd_syscall.exit_group = kprobe.function("sys_exit_group").call ?
+{
+       @_SYSCALL_EXIT_GROUP_NAME
+       asmlinkage()
+       status = int_arg(1)
+       @_SYSCALL_EXIT_GROUP_ARGSTR
+}
index 5b76ae57035299e7be87d254e8a51e0cae83e4be..2147de63fdc5acec8c1b41d5da1b51baeaeb4819 100644 (file)
@@ -1,16 +1,4 @@
 
-# exit_group _________________________________________________
-# void sys_exit_group(int error_code)
-#
-probe syscall.exit_group = kernel.function("sys_exit_group").call
-{
-       name = "exit_group"
-       status = __int32($error_code)
-       argstr = sprint(__int32($error_code))
-}
-# sys_exit_group() never returns, and is blacklisted for return probes,
-# so no alias here.  See bz6588.
-
 # faccessat __________________________________________________
 # new function with 2.6.16
 # long sys_faccessat(int dfd, const char __user *filename, int mode)
This page took 0.037061 seconds and 5 git commands to generate.