From: Jonathan Lebon Date: Wed, 13 Nov 2013 18:20:00 +0000 (-0500) Subject: PR16165: re-use perf_op token when expanding X-Git-Tag: release-2.5~389^2~62 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4653caf14ec83fc20bae6e6d440b6ce85b85ad57;p=systemtap.git PR16165: re-use perf_op token when expanding --- diff --git a/tapsets.cxx b/tapsets.cxx index 0b8a7d5aa..49740b022 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3872,13 +3872,8 @@ dwarf_var_expanding_visitor::visit_entry_op (entry_op *e) void dwarf_var_expanding_visitor::visit_perf_op (perf_op *e) { - token* t = new token; string e_lit_val = e->operand->value; - t->location = e->tok->location; - t->type = tok_identifier; - t->content = e_lit_val; - add_block = new block; add_block->tok = e->tok; @@ -3902,7 +3897,7 @@ dwarf_var_expanding_visitor::visit_perf_op (perf_op *e) perf_counter_refs.insert((*it).second.second); // __perf_read_N is assigned in the probe prologue symbol* sym = new symbol; - sym->tok = t; + sym->tok = e->tok; sym->name = "__perf_read_" + (*it).first; provide (sym); }