From 046e719028ae6b037fb7342b7d0764985bfaf408 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 9 Mar 2009 17:37:14 -0700 Subject: Add tracepoint $$parms alias for $$vars For parity with the DWARF probes, this makes tracepoints also define $$parms, which has the same value as $$vars (since tracepoints are missing the concept of $$locals). --- stapprobes.5.in | 2 +- tapsets.cxx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stapprobes.5.in b/stapprobes.5.in index 0daeb973..70d045c4 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -582,7 +582,7 @@ The name of the tracepoint is available in .BR $$name , and a string of name=value pairs for all parameters of the tracepoint is available in -.BR $$vars . +.BR $$vars " or " $$parms . .SS PERFORMANCE MONITORING HARDWARE diff --git a/tapsets.cxx b/tapsets.cxx index 18bd75f5..b748a487 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -9271,7 +9271,7 @@ tracepoint_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) stringstream alternatives; for (unsigned i = 0; i < args.size(); ++i) alternatives << " $" << args[i].name; - alternatives << " $$name $$vars"; + alternatives << " $$name $$parms $$vars"; // We hope that this value ends up not being referenced after all, so it // can be optimized out quietly. @@ -9457,7 +9457,7 @@ tracepoint_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session provide (n); } - else if (e->base_name == "$$vars") + else if (e->base_name == "$$vars" || e->base_name == "$$parms") { target_symbol *tsym = new target_symbol; print_format* pf = new print_format; @@ -9505,7 +9505,9 @@ tracepoint_var_expanding_visitor::visit_target_symbol (target_symbol* e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); - if (e->base_name == "$$name" || e->base_name == "$$vars") + if (e->base_name == "$$name" || + e->base_name == "$$parms" || + e->base_name == "$$vars") visit_target_symbol_context (e); else visit_target_symbol_arg (e); -- cgit