summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorhiramatu <hiramatu>2007-12-05 20:02:01 +0000
committerhiramatu <hiramatu>2007-12-05 20:02:01 +0000
commitdfd11cc3ea340096a2829f5ecda29998c73a0acb (patch)
treeba66a58789f0df1006a1ece1c616b2b38b15d29a /tapsets.cxx
parent0c218afb69ed53355a69e4264cbc5584908d65b4 (diff)
downloadsystemtap-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 'tapsets.cxx')
-rw-r--r--tapsets.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 35fe1e4b..d2cd3bcd 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -3642,11 +3642,16 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname,
this->tok = q.base_probe->tok;
+ // add condition from base location
+ if (q.base_loc->condition)
+ add_condition (q.base_loc->condition);
+ insert_condition_statement ();
+
// Make a target-variable-expanded copy of the probe body
if (scope_die)
{
dwarf_var_expanding_copy_visitor v (q, scope_die, dwfl_addr);
- require <block*> (&v, &(this->body), q.base_probe->body);
+ require <block*> (&v, &(this->body), this->body);
// If during target-variable-expanding the probe, we added a new block
// of code, add it to the start of the probe.
@@ -3718,9 +3723,6 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname,
(TOK_MAXACTIVE, new literal_number(maxactive_val)));
locations.push_back(new probe_point(comps, q.base_loc->tok));
- if (q.base_loc->condition)
- add_condition (q.base_loc->condition);
- insert_condition_statement ();
}