]> sourceware.org Git - systemtap.git/commitdiff
PR20333/tkill
authorMartin Cermak <mcermak@redhat.com>
Tue, 3 Jan 2017 12:27:11 +0000 (13:27 +0100)
committerMartin Cermak <mcermak@redhat.com>
Tue, 3 Jan 2017 12:27:11 +0000 (13:27 +0100)
tapset/linux/nd_syscalls2.stp
tapset/linux/sysc_tkill.stp [new file with mode: 0644]
tapset/linux/syscalls2.stp

index e0e68daa9ca009b017c12dc2c67144711be39947..65a1e3eb774c533e622540d8f4c3b8bd9616d84c 100644 (file)
@@ -1,24 +1,4 @@
 
-# tkill ______________________________________________________
-#
-# asmlinkage long
-# sys_tkill(int pid,
-#           int sig)
-#
-probe nd_syscall.tkill = kprobe.function("sys_tkill") ?
-{
-       name = "tkill"
-       asmlinkage()
-       pid = int_arg(1)
-       sig = int_arg(2)
-       argstr = sprintf("%d, %s", pid, _signal_name(sig))
-}
-probe nd_syscall.tkill.return = kprobe.function("sys_tkill").return ?
-{
-       name = "tkill"
-       retstr = returnstr(1)
-}
-
 # truncate ___________________________________________________
 #
 # sys_truncate(const char __user * path, unsigned long length)
diff --git a/tapset/linux/sysc_tkill.stp b/tapset/linux/sysc_tkill.stp
new file mode 100644 (file)
index 0000000..5ca5831
--- /dev/null
@@ -0,0 +1,53 @@
+# tkill ______________________________________________________
+#
+# asmlinkage long
+# sys_tkill(int pid,
+#           int sig)
+#
+
+@define _SYSCALL_TKILL_NAME
+%(
+       name = "tkill"
+%)
+
+@define _SYSCALL_TKILL_ARGSTR
+%(
+       argstr = sprintf("%d, %s", pid, sig_str)
+%)
+
+probe syscall.tkill = dw_syscall.tkill !, nd_syscall.tkill {}
+probe syscall.tkill.return = dw_syscall.tkill.return !,
+                             nd_syscall.tkill.return {}
+
+# dw_tkill _____________________________________________________
+
+probe dw_syscall.tkill = kernel.function("sys_tkill").call
+{
+       @_SYSCALL_TKILL_NAME
+       pid = __int32($pid)
+       sig = __int32($sig)
+       sig_str = _signal_name(sig)
+       @_SYSCALL_TKILL_ARGSTR
+}
+probe dw_syscall.tkill.return = kernel.function("sys_tkill").return
+{
+       @_SYSCALL_TKILL_NAME
+       retstr = return_str(1, $return)
+}
+
+# nd_tkill _____________________________________________________
+
+probe nd_syscall.tkill = kprobe.function("sys_tkill") ?
+{
+       @_SYSCALL_TKILL_NAME
+       asmlinkage()
+       pid = int_arg(1)
+       sig = int_arg(2)
+       sig_str = _signal_name(sig)
+       @_SYSCALL_TKILL_ARGSTR
+}
+probe nd_syscall.tkill.return = kprobe.function("sys_tkill").return ?
+{
+       @_SYSCALL_TKILL_NAME
+       retstr = returnstr(1)
+}
index 8e5c86d207dcf7c9884a1ebf5bd839a0d3e94714..51385a68f97f6b2aa6f8142bdd072f5826c8e774 100644 (file)
@@ -1,23 +1,4 @@
 
-# tkill ______________________________________________________
-#
-# asmlinkage long
-# sys_tkill(int pid,
-#           int sig)
-#
-probe syscall.tkill = kernel.function("sys_tkill").call
-{
-       name = "tkill"
-       pid = __int32($pid)
-       sig = __int32($sig)
-       argstr = sprintf("%d, %s", __int32($pid), _signal_name(__int32($sig)))
-}
-probe syscall.tkill.return = kernel.function("sys_tkill").return
-{
-       name = "tkill"
-       retstr = return_str(1, $return)
-}
-
 # truncate ___________________________________________________
 #
 # sys_truncate(const char __user * path, unsigned long length)
This page took 0.030253 seconds and 5 git commands to generate.