summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/twentynine.stp
diff options
context:
space:
mode:
authorhiramatu <hiramatu>2007-12-05 20:02:01 +0000
committerhiramatu <hiramatu>2007-12-05 20:02:01 +0000
commitdfd11cc3ea340096a2829f5ecda29998c73a0acb (patch)
treeba66a58789f0df1006a1ece1c616b2b38b15d29a /testsuite/semok/twentynine.stp
parent0c218afb69ed53355a69e4264cbc5584908d65b4 (diff)
downloadsystemtap-steved-dfd11cc3ea340096a2829f5ecda29998c73a0acb.tar.gz
systemtap-steved-dfd11cc3ea340096a2829f5ecda29998c73a0acb.tar.xz
systemtap-steved-dfd11cc3ea340096a2829f5ecda29998c73a0acb.zip
2007-12-05 Masami Hiramatsu <mhiramat@redhat.com>
PR 4935 * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Allow user to access kernel variables in the condition of probe points. * stapprobes.5.in : Document the conditional probe point. * NEWS : Ditto. * parseok/five.stp: Add an example of conditional probe point. * parseko/probepoint04.stp: New test for conditional probe point. * parseko/probepoint05.stp: Ditto. * parseko/probepoint06.stp: Ditto. * parseko/probepoint07.stp: Ditto. * parseko/probepoint08.stp: Ditto. * parseko/probepoint09.stp: Ditto. * semok/twentynine.stp: Ditto. * semko/thirtynine.stp: Ditto. * systemtap.base/onoffprobe.*: Ditto.
Diffstat (limited to 'testsuite/semok/twentynine.stp')
-rw-r--r--testsuite/semok/twentynine.stp20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/semok/twentynine.stp b/testsuite/semok/twentynine.stp
new file mode 100644
index 00000000..6fe308f2
--- /dev/null
+++ b/testsuite/semok/twentynine.stp
@@ -0,0 +1,20 @@
+#! stap -p2
+global p
+function dummy:long () {return p;}
+
+# alias with a condition
+probe alias0 = begin if (3) {p=1}
+# alias with a kernel-variable condition
+probe alias1 = kernel.function("sys_read").return if ($return) {p=0}
+# alias with a function-call condition
+probe blias0 = timer.s(1) if (dummy()) {p=10}
+
+# multiple probe point with conditions
+probe alias2 = alias0 if (1), alias1 if (-1) {p=2}
+
+# wildcard with a global-variable condition
+probe *lias0 if (p) {print(p)}
+
+# multi level alias with a condition
+probe alias2 if(4) {print(p)}
+