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. --- stapprobes.5.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'stapprobes.5.in') diff --git a/stapprobes.5.in b/stapprobes.5.in index 6d1df5a4..276358a0 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -41,6 +41,13 @@ sufficient. (Think vaguely of the prolog cut operator.) If it does resolve, then no further probe points in the same comma-separated list will be resolved. Therefore, the "!" sufficiency mark only makes sense in a list of probe point alternatives. +.PP +Additionally, a probe point may be followed by a "if (expr)" statement, in +order to enable/disable the probe point on-the-fly. With the "if" statement, +if the "expr" is false when the probe point is hit, the whole probe body +including alias's body is skipped. The condition is stacked up through +all levels of alias/wildcard expansion. So the final condition becomes +the logical-and of conditions of all expanded alias/wildcard. These are all syntactically valid probe points: @@ -52,6 +59,7 @@ end syscall.* kernel.function("no_such_function") ? module("awol").function("no_such_function") ! +signal.*? if (switch) .ESAMPLE Probes may be broadly classified into "synchronous" and -- cgit