From dfd11cc3ea340096a2829f5ecda29998c73a0acb Mon Sep 17 00:00:00 2001 From: hiramatu Date: Wed, 5 Dec 2007 20:02:01 +0000 Subject: 2007-12-05 Masami Hiramatsu 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. --- testsuite/semok/twentynine.stp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 testsuite/semok/twentynine.stp (limited to 'testsuite/semok/twentynine.stp') 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)} + -- cgit