From 3e3bd7b6b9dd2ba282990f39d60e3ad5ecfec023 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 6 Apr 2009 16:11:30 -0700 Subject: PR10026: Read marker/tracepoint args directly We already stash the context variables for markers and tracepoints into the locals for the probe body, but then we were using separate functions to read those locals for each particular probe body. This patch instead teaches the unparser how to emit the local name directly for those context variables. The resulting code from the translator is much simpler now. --- elaborate.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'elaborate.h') diff --git a/elaborate.h b/elaborate.h index 0ad5b4b2..d927177b 100644 --- a/elaborate.h +++ b/elaborate.h @@ -129,6 +129,11 @@ struct derived_probe: public probe void printsig_nested (std::ostream &o) const; virtual void collect_derivation_chain (std::vector &probes_list); + virtual void print_dupe_stamp(std::ostream&) {} + // To aid duplication elimination, print a stamp which uniquely identifies + // the code that will be added to the probe body. (Doesn't need to be the + // actual code...) + virtual void emit_probe_context_vars (translator_output*) {} // From within unparser::emit_common_header, add any extra variables // to this probe's context locals. -- cgit