From 46b84a80a83501d9a83856c255b74100be1717b9 Mon Sep 17 00:00:00 2001 From: dsmith Date: Fri, 8 Sep 2006 13:05:49 +0000 Subject: 2006-09-08 David Smith * elaborate.h (struct derived_probe): Replace emit_registrations() function with emit_registrations_start() and emit_registrations_end(). (struct derived_probe_group): Added emit_module_init(). (struct derived_probe_group_container): Added emit_module_init(), emit_module_init_call(), and emit_module_exit(). * elaborate.cxx (struct alias_derived_probe): Updated emit_regitrations calls. * translate.cxx (emit_module_init): Instead of actually emitting per-probe-point registrations/unregistrations, let the session's derived_probe_group_container do it. * tapsets.cxx (emit_probe_timing): New function that handles probe timing code. (be_derived_probe::emit_registrations_start): Renamed from emit_registrations. (be_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (dwarf_derived_probe::emit_registrations): Removed, but most code moved to emit_registrations_start(). (dwarf_derived_probe::emit_registrations_start): Handles details of multiple dwarf probe registrations. (dwarf_derived_probe::emit_registrations_end): Handles cleanup details of multiple dwarf probe registrations. (dwarf_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (timer_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (timer_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (timer_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (profile_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (profile_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (profile_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (mark_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (mark_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (mark_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (hrtimer_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (hrtimer_derived_probe::emit_registrations_end): Dummy function. (hrtimer_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (derived_probe_group_container::emit_module_init): Added function to call all probe group's emit_module_int functions. (derived_probe_group_container::emit_module_init_call): Added function to handle probe group initialization cleanup. (derived_probe_group_container::emit_module_exit): Added function to handle probe group cleanup. --- elaborate.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'elaborate.h') diff --git a/elaborate.h b/elaborate.h index 9cb5b88e..096d4238 100644 --- a/elaborate.h +++ b/elaborate.h @@ -117,7 +117,10 @@ struct derived_probe: public probe virtual void register_probe (systemtap_session& s) = 0; - virtual void emit_registrations (translator_output* o) = 0; + virtual void emit_registrations_start (translator_output* o, + unsigned index) = 0; + virtual void emit_registrations_end (translator_output* o, + unsigned index) = 0; // (from within module_init): // rc = ..... register_or_whatever (ENTRYFN); @@ -172,8 +175,11 @@ struct derived_probe_group virtual size_t size () = 0; virtual void emit_probes (translator_output* op, unparser* up) = 0; + + virtual void emit_module_init (translator_output* o) = 0; }; + // ------------------------------------------------------------------------ struct derived_probe_builder @@ -276,6 +282,9 @@ public: derived_probe* operator[] (size_t n) { return (probes[n]); } void emit_probes (translator_output* op, unparser* up); + void emit_module_init (translator_output* o); + void emit_module_init_call (translator_output* o); + void emit_module_exit (translator_output* o); }; -- cgit