diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-18 06:27:14 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-18 06:27:14 +0000 |
commit | cf88944b75262f76b39c730152afc95d6f0d78b0 (patch) | |
tree | 5b7ebbc750ce8e653c93dd6004991a49b72a915a | |
parent | 616c8f351ae8707f95c55349a245f0292c504694 (diff) | |
download | ATCD-cf88944b75262f76b39c730152afc95d6f0d78b0.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/GIOP.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/POA.cpp | 33 | ||||
-rw-r--r-- | TAO/tao/Timeprobe.h | 65 |
4 files changed, 98 insertions, 16 deletions
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp index 8ba087c62e6..99a8c26aa48 100644 --- a/TAO/tao/GIOP.cpp +++ b/TAO/tao/GIOP.cpp @@ -262,6 +262,7 @@ TAO_GIOP::read_buffer (ACE_SOCK_Stream &peer, char *buf, size_t len) { + ACE_FUNCTION_TIMEPROBE (TAO_GIOP_READ_BUFFER_START); ssize_t bytes_read = bytes_read = peer.recv_n (buf, len); if (bytes_read == -1 && errno == ECONNRESET) @@ -1153,6 +1154,7 @@ CORBA::Boolean TAO_GIOP_LocateRequestHeader::init (TAO_InputCDR &msg, CORBA::Environment &env) { + ACE_FUNCTION_TIMEPROBE (TAO_GIOP_LOCATE_REQUEST_HEADER_INIT_START); return (msg.read_ulong (this->request_id) && msg.decode (&TC_opaque, &this->object_key, @@ -1166,6 +1168,7 @@ CORBA::Boolean TAO_GIOP_RequestHeader::init (TAO_InputCDR &msg, CORBA::Environment &env) { + ACE_FUNCTION_TIMEPROBE (TAO_GIOP_REQUEST_HEADER_INIT_START); CORBA::Boolean hdr_status; // Tear out the service context ... we currently ignore it, but it diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index d2dc4abeaad..181bdc741ee 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -182,11 +182,18 @@ CORBA_ORB::run (ACE_Time_Value *tv) return -1; // Loop "forever" handling client requests. - + + const int max_iterations = 100; + int counter = 0; while (this->should_shutdown_ == 0) { - ACE_TIMEPROBE_PRINT_USING_TABLE (TAO_Timeprobe_Description); - ACE_TIMEPROBE_RESET; + counter++; + if (counter == max_iterations) + { + ACE_TIMEPROBE_PRINT_USING_TABLE (TAO_Timeprobe_Description); + ACE_TIMEPROBE_RESET; + counter = 0; + } ACE_FUNCTION_TIMEPROBE (TAO_CORBA_ORB_RUN_START); switch (r->handle_events (tv)) { diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp index faa39069abc..7773fe671d1 100644 --- a/TAO/tao/POA.cpp +++ b/TAO/tao/POA.cpp @@ -9,6 +9,9 @@ // auto_ptr class #include "ace/Auto_Ptr.h" +// Timeprobes class +#include "tao/Timeprobe.h" + // This is the maximum space require to convert the ulong into a // string. const int TAO_POA::max_space_required_for_ulong = 24; @@ -2186,6 +2189,8 @@ TAO_POA::locate_poa_i (const TAO_ObjectKey &key, PortableServer::ObjectId_out id, CORBA::Environment &env) { + ACE_FUNCTION_TIMEPROBE (TAO_POA_LOCATE_POA_I_START); + TAO_POA::String poa_name; CORBA::Boolean persistent = CORBA::B_FALSE; TAO_Temporary_Creation_Time poa_creation_time; @@ -2339,6 +2344,8 @@ TAO_POA::locate_poa_and_servant_i (const TAO_ObjectKey &key, TAO_POA *&poa_impl, CORBA::Environment &env) { + ACE_FUNCTION_TIMEPROBE (TAO_POA_LOCATE_POA_AND_SERVANT_I_START); + poa_impl = this->locate_poa_i (key, id, env); @@ -2352,9 +2359,13 @@ TAO_POA::locate_poa_and_servant_i (const TAO_ObjectKey &key, if (poa_impl->policies ().servant_retention () == PortableServer::RETAIN) { PortableServer::Servant servant = 0; - if (poa_impl->active_object_map ().find (*id.ptr (), servant) != -1) - // Success - return servant; + { + ACE_FUNCTION_TIMEPROBE (TAO_POA_FIND_SERVANT_START); + + if (poa_impl->active_object_map ().find (*id.ptr (), servant) != -1) + // Success + return servant; + } } // If the POA has the NON_RETAIN policy or has the RETAIN policy but @@ -2506,6 +2517,8 @@ TAO_POA::dispatch_servant (const TAO_ObjectKey &key, void *context, CORBA::Environment &env) { + ACE_FUNCTION_TIMEPROBE (TAO_POA_DISPATCH_SERVANT_START); + // Lock access to the POAManager for the duration of this transaction TAO_POA_READ_GUARD (ACE_Lock, monitor, this->lock (), env); @@ -2545,10 +2558,14 @@ TAO_POA::dispatch_servant_i (const TAO_ObjectKey &key, ¤t_context, env); - // Upcall - servant->_dispatch (req, - context, - env); + { + ACE_FUNCTION_TIMEPROBE (TAO_SERVANT_DISPATCH_START); + + // Upcall + servant->_dispatch (req, + context, + env); + } // Cleanup from upcall poa->post_invoke (servant, @@ -2660,6 +2677,8 @@ TAO_POA::parse_key (const TAO_ObjectKey &key, TAO_Temporary_Creation_Time &poa_creation_time, int temporary_id) { + ACE_FUNCTION_TIMEPROBE (TAO_POA_PARSE_KEY_START); + // Try to find the last separator int last_token_position = this->rfind (key, TAO_POA::name_separator ()); diff --git a/TAO/tao/Timeprobe.h b/TAO/tao/Timeprobe.h index d6df95704d7..85bf06852bd 100644 --- a/TAO/tao/Timeprobe.h +++ b/TAO/tao/Timeprobe.h @@ -1,7 +1,7 @@ // $Id$ -#define ACE_COMPILE_TIMEPROBES -#define ACE_ENABLE_TIMEPROBES +//#define ACE_COMPILE_TIMEPROBES +//#define ACE_ENABLE_TIMEPROBES //#define ACE_MT_TIMEPROBES //#define ACE_TSS_TIMEPROBES @@ -18,17 +18,45 @@ static const char *TAO_Timeprobe_Description[] = "GIOP::recv_request - start", "GIOP::recv_request - end", + "GIOP::read_buffer - start", + "GIOP::read_buffer - end", + + "GIOP::RequestHeader_init - start", + "GIOP::RequestHeader_init - end", + + "GIOP::LocateRequestHeader_init - start", + "GIOP::LocateRequestHeader_init - end", + "Server_Connection_Handler::send_response - start", "Server_Connection_Handler::send_response - end", - "Server_Connection_Handler::handle_input start", - "Server_Connection_Handler::handle_input end", + "Server_Connection_Handler::handle_input - start", + "Server_Connection_Handler::handle_input - end", "Client_Connection_Handler::send_request - start", "Client_Connection_Handler::send_request - end", - "CORBA_ORB::run start", - "CORBA_ORB::run end", + "CORBA_ORB::run - start", + "CORBA_ORB::run - end", + + "POA::locate_poa_i - start", + "POA::locate_poa_i - end", + + "POA::locate_poa_and_servant_i - start", + "POA::locate_poa_and_servant_i - end", + + "POA::find_servant - start", + "POA::find_servant - end", + + "POA::dispatch_servant - start", + "POA::dispatch_servant - end", + + "POA::parse_key - start", + "POA::parse_key - end", + + "Servant::_dispatch - start", + "Servant::_dispatch - end", + }; @@ -42,6 +70,15 @@ enum TAO_GIOP_RECV_REQUEST_START, TAO_GIOP_RECV_REQUEST_END, + TAO_GIOP_READ_BUFFER_START, + TAO_GIOP_READ_BUFFER_END, + + TAO_GIOP_REQUEST_HEADER_INIT_START, + TAO_GIOP_REQUEST_HEADER_INIT_END, + + TAO_GIOP_LOCATE_REQUEST_HEADER_INIT_START, + TAO_GIOP_LOCATE_REQUEST_HEADER_INIT_END, + TAO_SERVER_CONNECTION_HANDLER_SEND_RESPONSE_START, TAO_SERVER_CONNECTION_HANDLER_SEND_RESPONSE_END, @@ -54,7 +91,23 @@ enum TAO_CORBA_ORB_RUN_START, TAO_CORBA_ORB_RUN_END, + TAO_POA_LOCATE_POA_I_START, + TAO_POA_LOCATE_POA_I_END, + + TAO_POA_LOCATE_POA_AND_SERVANT_I_START, + TAO_POA_LOCATE_POA_AND_SERVANT_I_END, + + TAO_POA_FIND_SERVANT_START, + TAO_POA_FIND_SERVANT_END, + + TAO_POA_DISPATCH_SERVANT_START, + TAO_POA_DISPATCH_SERVANT_END, + + TAO_POA_PARSE_KEY_START, + TAO_POA_PARSE_KEY_END, + TAO_SERVANT_DISPATCH_START, + TAO_SERVANT_DISPATCH_END, TAO_LAST_TIMEPROBE_ENTRY |