summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/onoffprobe.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-01-17 21:52:42 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-01-17 21:52:42 -0500
commit7ee3e80ec0b7880c33d0ca3018025855d9dd5123 (patch)
treec39e234447fed3ca04c6467784fae5ddc85ce7d6 /testsuite/systemtap.base/onoffprobe.stp
parent2b7f11a05877405a3dd232ac297e11f9d8253c2d (diff)
parentaf3047833424103c4e17728e849670da865d37c3 (diff)
downloadsystemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.tar.gz
systemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.tar.xz
systemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.base/onoffprobe.stp')
-rw-r--r--testsuite/systemtap.base/onoffprobe.stp23
1 files changed, 17 insertions, 6 deletions
diff --git a/testsuite/systemtap.base/onoffprobe.stp b/testsuite/systemtap.base/onoffprobe.stp
index 11968540..f7169039 100644
--- a/testsuite/systemtap.base/onoffprobe.stp
+++ b/testsuite/systemtap.base/onoffprobe.stp
@@ -1,34 +1,45 @@
-global switch=0
+global switch=-1
#begin probe
+probe begin if (switch==-1) {
+ log("begin1 probed");
+}
+
probe begin if (switch==0) {
- log("begin probed\n");
+ log("begin2 probed");
}
#dwarf probe (return)
probe kernel.function("sys_write").return if (switch == 1) {
- log("function return probed\n")
+ log("function return probed")
switch = 0
}
#dwarf probe (entry)
probe kernel.function("sys_write") if (switch == 2) {
- log("function entry probed\n")
+ log("function entry probed")
switch = 0
}
#timer probe
probe timer.s(1) if (switch == 3) {
- log("timer probed\n")
+ log("timer probed")
switch = 0
}
#profile probe
probe timer.profile if (switch == 4) {
- log("profile probed\n")
+ log("profile probed")
switch = 0
}
+# aliasess
+probe alias.one.a = timer.s(2) if (switch == 5) { print("alias.one.a and") }
+probe alias.one.b = timer.s(3) if (switch == 6) { print("alias.one.b and") }
+probe alias.one = alias.one.* if (switch >= 5 && switch < 7) { print(" alias.one and") }
+probe alias.two = timer.s(4) if (switch == 7) { print("alias.two and") }
+probe alias.* if (switch) { log(" alias.* probed") }
+
probe procfs("switch").write {
switch = strtol($value, 10)
}