summaryrefslogtreecommitdiffstats
path: root/tapset-perfmon.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-08-04 12:35:41 -0400
committerDave Brolley <brolley@redhat.com>2009-08-04 12:35:41 -0400
commitbc9077d171b8250a93a1b5a481e34913e5585dd5 (patch)
tree1fa945c76a66e297e783354ccd7a860aa65d304b /tapset-perfmon.cxx
parent3174c3ca37371d738b86d630dc4d8b15104e57d0 (diff)
parent8b095b454b34e88c04592be6c651153f802eced6 (diff)
downloadsystemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.gz
systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.xz
systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: cache.cxx
Diffstat (limited to 'tapset-perfmon.cxx')
-rw-r--r--tapset-perfmon.cxx21
1 files changed, 2 insertions, 19 deletions
diff --git a/tapset-perfmon.cxx b/tapset-perfmon.cxx
index 0fb567f7..86806d61 100644
--- a/tapset-perfmon.cxx
+++ b/tapset-perfmon.cxx
@@ -67,24 +67,7 @@ perfmon_var_expanding_visitor::visit_target_symbol (target_symbol *e)
if (e->addressof)
throw semantic_error("cannot take address of perfmon variable", e->tok);
- if (e->components.size() > 0)
- {
- switch (e->components[0].first)
- {
- case target_symbol::comp_literal_array_index:
- throw semantic_error("perfmon probe '$counter' variable may not be used as array",
- e->tok);
- break;
- case target_symbol::comp_struct_member:
- throw semantic_error("perfmon probe '$counter' variable may not be used as a structure",
- e->tok);
- break;
- default:
- throw semantic_error ("invalid use of perfmon probe '$counter' variable",
- e->tok);
- break;
- }
- }
+ e->assert_no_components("perfmon");
ec->code = "THIS->__retvalue = _pfm_pmd_x[" +
lex_cast<string>(counter_number) + "].reg_num;";
@@ -170,7 +153,7 @@ perfmon_derived_probe::perfmon_derived_probe (probe* p, probe_point* l,
// Now expand the local variables in the probe body
perfmon_var_expanding_visitor v (sess, probes_allocated-1);
- this->body = v.require (this->body);
+ v.replace (this->body);
if (sess.verbose > 1)
clog << "perfmon-based probe" << endl;