From a7383554ab7dd6070e079938cf4635ca686162ef Mon Sep 17 00:00:00 2001 From: irfan Date: Wed, 27 May 1998 19:25:17 +0000 Subject: *** empty log message *** --- ace/Timeprobe.h | 114 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'ace/Timeprobe.h') diff --git a/ace/Timeprobe.h b/ace/Timeprobe.h index 6e8af138d3a..114d3d38c78 100644 --- a/ace/Timeprobe.h +++ b/ace/Timeprobe.h @@ -8,6 +8,54 @@ #include "ace/Malloc.h" +// = Event Descriptions +struct ACE_Event_Descriptions +{ + const char **descriptions_; + // Event descriptions + + u_long minimum_id_; + // Minimum id of this description set + + int operator== (const ACE_Event_Descriptions &rhs) const + { + return + this->minimum_id_ == rhs.minimum_id_ && + this->descriptions_ == rhs.descriptions_; + } + // Comparison +}; + +// = Time probe record +struct ACE_timeprobe_t +{ + union event + { + u_long event_number_; + const char *event_description_; + }; + // Events are record as strings or numbers + + enum event_type + { + NUMBER, + STRING + }; + // Type of event + + event event_; + // Event + + event_type event_type_; + // Event type + + ACE_hrtime_t time_; + // Timestamp + + ACE_thread_t thread_; + // Id of thread posting the time probe +}; + template class ACE_Timeprobe { @@ -80,25 +128,7 @@ protected: typedef ACE_Timeprobe SELF; // Self - // = Event Descriptions - struct Event_Descriptions - { - const char **descriptions_; - // Event descriptions - - u_long minimum_id_; - // Minimum id of this description set - - int operator== (const Event_Descriptions &rhs) const - { - return - this->minimum_id_ == rhs.minimum_id_ && - this->descriptions_ == rhs.descriptions_; - } - // Comparison - }; - - typedef ACE_Unbounded_Set EVENT_DESCRIPTIONS; + typedef ACE_Unbounded_Set EVENT_DESCRIPTIONS; // We can hold multiple event description tables EVENT_DESCRIPTIONS event_descriptions_; @@ -120,37 +150,7 @@ protected: void sort_event_descriptions_i (void); // Sort event descriptions - // = Time probe record - struct timeprobe_t - { - union event - { - u_long event_number_; - const char *event_description_; - }; - // Events are record as strings or numbers - - enum event_type - { - NUMBER, - STRING - }; - // Type of event - - event event_; - // Event - - event_type event_type_; - // Event type - - ACE_hrtime_t time_; - // Timestamp - - ACE_thread_t thread_; - // Id of thread posting the time probe - }; - - timeprobe_t *timeprobes_; + ACE_timeprobe_t *timeprobes_; // Time probe slots ACE_Allocator *allocator_; @@ -216,15 +216,15 @@ typedef ACE_Timeprobe ACE_TIMEPROBE_WITH_LOCKING; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Timeprobe; template class ACE_Function_Timeprobe >; -template class ACE_Unbounded_Set_Iterator::Event_Descriptions>; -template class ACE_Unbounded_Set::Event_Descriptions>; -template class ACE_Node::Event_Descriptions>; +template class ACE_Unbounded_Set_Iterator; +template class ACE_Unbounded_Set; +template class ACE_Node; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Timeprobe #pragma instantiate ACE_Function_Timeprobe > -#pragma instantiate ACE_Unbounded_Set_Iterator::Event_Descriptions> -#pragma instantiate ACE_Unbounded_Set::Event_Descriptions> -#pragma instantiate ACE_Node::Event_Descriptions> +#pragma instantiate ACE_Unbounded_Set_Iterator +#pragma instantiate ACE_Unbounded_Set +#pragma instantiate ACE_Node #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ // If ACE_TSS_TIMEPROBES is defined, store the ACE_Timeprobe singleton @@ -271,7 +271,7 @@ template class ACE_Singleton; # define ACE_TIMEPROBE_RESET # define ACE_TIMEPROBE(id) # define ACE_TIMEPROBE_PRINT -# define ACE_TIMEPROBE_EVENT_DESCRIPTIONS(descriptions, minimum_id) ACE_UNUSED_ARG (descriptions) +# define ACE_TIMEPROBE_EVENT_DESCRIPTIONS(descriptions, minimum_id) static const char **ace_timeprobe_##descriptions##_dummy = descriptions # define ACE_FUNCTION_TIMEPROBE(X) #endif /* ACE_ENABLE_TIMEPROBES */ -- cgit v1.2.1