]> sourceware.org Git - systemtap.git/commitdiff
PR16165: re-use perf_op token when expanding
authorJonathan Lebon <jlebon@redhat.com>
Wed, 13 Nov 2013 18:20:00 +0000 (13:20 -0500)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 13 Nov 2013 18:26:14 +0000 (13:26 -0500)
tapsets.cxx

index 0b8a7d5aa8120cce1050ca85d57ac456145af1aa..49740b022a4c41dae96b42ef88c2069f752aae09 100644 (file)
@@ -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);
     }
This page took 0.048988 seconds and 5 git commands to generate.