summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/onoffprobe.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-12-14 11:08:51 -0500
committerFrank Ch. Eigler <fche@elastic.org>2007-12-14 11:08:51 -0500
commit06e0853b32f53f33d791a99d21e630800642a442 (patch)
treed94038318e93302e360e2f855f77dc6b8eec1f3f /testsuite/systemtap.base/onoffprobe.stp
parente9369426e1146a2373ac47c11647bdd70d41f7be (diff)
parent149eaccd1d42882b20471c4fdae07c32024cc654 (diff)
downloadsystemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.tar.gz
systemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.tar.xz
systemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.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.stp35
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/onoffprobe.stp b/testsuite/systemtap.base/onoffprobe.stp
new file mode 100644
index 00000000..11968540
--- /dev/null
+++ b/testsuite/systemtap.base/onoffprobe.stp
@@ -0,0 +1,35 @@
+global switch=0
+
+#begin probe
+probe begin if (switch==0) {
+ log("begin probed\n");
+}
+
+#dwarf probe (return)
+probe kernel.function("sys_write").return if (switch == 1) {
+ log("function return probed\n")
+ switch = 0
+}
+
+#dwarf probe (entry)
+probe kernel.function("sys_write") if (switch == 2) {
+ log("function entry probed\n")
+ switch = 0
+}
+
+#timer probe
+probe timer.s(1) if (switch == 3) {
+ log("timer probed\n")
+ switch = 0
+}
+
+#profile probe
+probe timer.profile if (switch == 4) {
+ log("profile probed\n")
+ switch = 0
+}
+
+probe procfs("switch").write {
+ switch = strtol($value, 10)
+}
+