diff options
author | hiramatu <hiramatu> | 2007-12-05 20:02:01 +0000 |
---|---|---|
committer | hiramatu <hiramatu> | 2007-12-05 20:02:01 +0000 |
commit | dfd11cc3ea340096a2829f5ecda29998c73a0acb (patch) | |
tree | ba66a58789f0df1006a1ece1c616b2b38b15d29a /testsuite/systemtap.base/onoffprobe.stp | |
parent | 0c218afb69ed53355a69e4264cbc5584908d65b4 (diff) | |
download | systemtap-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/systemtap.base/onoffprobe.stp')
-rw-r--r-- | testsuite/systemtap.base/onoffprobe.stp | 35 |
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) +} + |