diff options
author | Josh Stone <jistone@redhat.com> | 2009-03-09 17:37:14 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-03-09 17:37:14 -0700 |
commit | 046e719028ae6b037fb7342b7d0764985bfaf408 (patch) | |
tree | 012de0d14fd51abb14bec9fb9abe8070eb1f9b83 | |
parent | c3add01f692e698995a62c13e154bab35d9212df (diff) | |
download | systemtap-steved-046e719028ae6b037fb7342b7d0764985bfaf408.tar.gz systemtap-steved-046e719028ae6b037fb7342b7d0764985bfaf408.tar.xz systemtap-steved-046e719028ae6b037fb7342b7d0764985bfaf408.zip |
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).
-rw-r--r-- | stapprobes.5.in | 2 | ||||
-rw-r--r-- | 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); |