summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/nodwf02.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok/nodwf02.stp')
-rwxr-xr-xtestsuite/semok/nodwf02.stp44
1 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/semok/nodwf02.stp b/testsuite/semok/nodwf02.stp
new file mode 100755
index 00000000..545f6154
--- /dev/null
+++ b/testsuite/semok/nodwf02.stp
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+stap -p2 --ignore-vmlinux --kmap=/proc/kallsyms -e '
+global ncall
+
+/*
+ * We want
+ * probe syscall.*
+ * but in the syscall tapset, the prologue blocks for the following system
+ * calls contain "if" statements that cause target variables to be read...
+ * and we cannot evaluate target variables without dwarf.
+ * bdflush, clock_nanosleep, fork, futex, getrusage, mq_open, open, sysfs
+ */
+probe
+ syscall.a*,
+ /* skip b */
+ /* skip c */
+ syscall.d*,
+ syscall.e*,
+ /* skip f */
+ /* skip g */
+ /* no h */
+ syscall.i*,
+ /* no j */
+ syscall.k*,
+ syscall.l*,
+ /* skip m */
+ syscall.n*,
+ /* skip o */
+ syscall.p*,
+ syscall.q*,
+ syscall.r*,
+ /* skip s */
+ syscall.t*,
+ syscall.u*,
+ syscall.v*,
+ syscall.w*
+ /* no xyz */
+{
+ printf("%s called\n", name)
+ if (ncall++ > 50)
+ exit()
+}
+'