From 3a428704779ca24f2a916f6ffa1c01692d49b31a Mon Sep 17 00:00:00 2001 From: parsons Date: Mon, 12 Apr 1999 18:48:27 +0000 Subject: *** empty log message *** --- TAO/ChangeLog-99c | 12 +++++++++++ TAO/tao/Connect.cpp | 20 +++++++++++++----- TAO/tao/Invocation.cpp | 2 +- TAO/tao/Timeprobe.h | 57 +++++++++++++++++++++++++++++++++++++++++--------- 4 files changed, 75 insertions(+), 16 deletions(-) diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 340ce32370e..6dd7f3dec19 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,15 @@ +Mon Apr 12 13:41:23 1999 Jeff Parsons + + * tao/Timeprobe.h: + * tao/Connect.cpp: + * tao/Invocation.cpp: + Added four new timeprobes to measure client outgoing + process time and server process time. Whereas the + pluggable protocols timeprobes were a subset of the + regular timeprobes, these are a disjoint set. If both + the pluggable and minimal timeprobes macros are + uncommented in Timeprobe.h, pluggable will override. + Mon Apr 12 12:37:39 1999 Carlos O'Ryan * tao/Stub.cpp: diff --git a/TAO/tao/Connect.cpp b/TAO/tao/Connect.cpp index 0de9f13342a..e663a555143 100644 --- a/TAO/tao/Connect.cpp +++ b/TAO/tao/Connect.cpp @@ -28,11 +28,12 @@ static const char *TAO_Connect_Timeprobe_Description[] = "Server_Connection_Handler::handle_locate - start", "Server_Connection_Handler::handle_locate - end", + "Server_Connection_Handler::receive_request - end", + "Client_Connection_Handler::send_request - start", "Client_Connection_Handler::send_request - end", - "MT_Client_Connection_Handler - before l/f wakeup", - "MT_Client_Connection_Handler - after l/f wakeup" + "GIOP::Send_Request - return" }; enum @@ -47,11 +48,12 @@ enum TAO_SERVER_CONNECTION_HANDLER_HANDLE_LOCATE_START, TAO_SERVER_CONNECTION_HANDLER_HANDLE_LOCATE_END, + TAO_SERVER_CONNECTION_HANDLER_RECEIVE_REQUEST_END, + TAO_CLIENT_CONNECTION_HANDLER_SEND_REQUEST_START, TAO_CLIENT_CONNECTION_HANDLER_SEND_REQUEST_END, - TAO_MT_CLIENT_CONNECTION_HANDLER_BEFORE_LF_WAKEUP, - TAO_MT_CLIENT_CONNECTION_HANDLER_AFTER_LF_WAKEUP + GIOP_SEND_REQUEST_RETURN }; // Setup Timeprobes @@ -641,6 +643,8 @@ TAO_Server_Connection_Handler::handle_input (ACE_HANDLE) TAO_GIOP::Message_Type type = TAO_GIOP::recv_request (this->iiop_transport_, input, this->orb_core_); + TAO_MINIMAL_TIMEPROBE (TAO_SERVER_CONNECTION_HANDLER_RECEIVE_REQUEST_END); + // Check to see if we've been cancelled cooperatively. if (this->orb_core_->orb ()->should_shutdown () != 0) error_encountered = 1; @@ -776,6 +780,8 @@ TAO_Server_Connection_Handler::handle_input (ACE_HANDLE) return -1; } + TAO_MINIMAL_TIMEPROBE (TAO_SERVER_CONNECTION_HANDLER_HANDLE_INPUT_END); + return result; } @@ -968,6 +974,8 @@ TAO_ST_Client_Connection_Handler::send_request (TAO_ORB_Core* orb_core, int success = (int) TAO_GIOP::send_request (this->iiop_transport_, stream, orb_core); + TAO_MINIMAL_TIMEPROBE (GIOP_SEND_REQUEST_RETURN); + if (!success) return -1; @@ -1049,6 +1057,8 @@ TAO_MT_Client_Connection_Handler::send_request (TAO_ORB_Core *orb_core, stream, orb_core); + TAO_MINIMAL_TIMEPROBE (GIOP_SEND_REQUEST_RETURN); + if (!success) return -1; } @@ -1070,7 +1080,7 @@ TAO_MT_Client_Connection_Handler::send_request (TAO_ORB_Core *orb_core, stream, orb_core); - TAO_PP_TIMEPROBE (TAO_MT_CLIENT_CONNECTION_HANDLER_BEFORE_LF_WAKEUP); + TAO_MINIMAL_TIMEPROBE (GIOP_SEND_REQUEST_RETURN); if (!success) { diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 70dbc4e3926..6ed2a39af01 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -111,6 +111,7 @@ TAO_GIOP_Invocation::start (CORBA::Boolean is_roundtrip, ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_FUNCTION_TIMEPROBE (TAO_GIOP_INVOCATION_START_ENTER); + TAO_MINIMAL_TIMEPROBE (TAO_GIOP_INVOCATION_START_ENTER); // First try to bind to the appropriate address. We do that here // since we may get forwarded to a different objref in the course of @@ -318,7 +319,6 @@ TAO_GIOP_Invocation::invoke (CORBA::Boolean is_roundtrip, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - TAO_FUNCTION_PP_TIMEPROBE (TAO_GIOP_INVOCATION_INVOKE_START); if (this->transport_ == 0) ACE_THROW_RETURN (CORBA::INTERNAL (CORBA::COMPLETED_NO), diff --git a/TAO/tao/Timeprobe.h b/TAO/tao/Timeprobe.h index c0ff43534c3..2967a794ebb 100644 --- a/TAO/tao/Timeprobe.h +++ b/TAO/tao/Timeprobe.h @@ -15,20 +15,57 @@ // the ones that are pertinent to pluggable protocols. //#define TAO_SELECT_PP_TIMEPROBES +// The macro for turning off all timeprobes except +// four - 2 to measure client send time and 2 to measure +// server upcall processing and return time. +// NOTE: If both this and the pluggable protocols macro +// above are defined, code below will undefine this macro. +// They should not both be defined at the same time. +//#define TAO_SELECT_MINIMAL_TIMEPROBES + + #if defined (ACE_ENABLE_TIMEPROBES) -# define TAO_PP_TIMEPROBE(id) ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id) -# define TAO_FUNCTION_PP_TIMEPROBE(X) ACE_Function_Timeprobe function_timeprobe (*ACE_TIMEPROBE_SINGLETON::instance (), X) + +# define TAO_PP_TIMEPROBE(id) \ + ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id) +# define TAO_FUNCTION_PP_TIMEPROBE(X) \ + ACE_Function_Timeprobe \ + function_timeprobe (*ACE_TIMEPROBE_SINGLETON::instance (), X) +# define TAO_MINIMAL_TIMEPROBE(id) + +# if defined (TAO_SELECT_PP_TIMEPROBES) +# if defined TAO_SELECT_MINIMAL_TIMEPROBES +# undef TAO_SELECT_MINIMIAL_TIMEPROBES +# endif /* TAO_SELECT_MINIMAL_TIMEPROBES */ +# undef ACE_TIMEPROBE +# define ACE_TIMEPROBE(id) +# undef ACE_FUNCTION_TIMEPROBE +# define ACE_FUNCTION_TIMEPROBE(X) +# define TAO_MINIMAL_TIMEPROBE(id) +# endif /* TAO_SELECT_PP_TIMEPROBES */ + +# if defined (TAO_SELECT_MINIMAL_TIMEPROBES) +# undef TAO_MINIMAL_TIMEPROBE +# define TAO_MINIMAL_TIMEPROBE(id) \ + ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id) +# undef ACE_TIMEPROBE +# define ACE_TIMEPROBE(id) +# undef ACE_FUNCTION_TIMEPROBE +# define ACE_FUNCTION_TIMEPROBE(X) +# undef TAO_PP_TIMEPROBE +# define TAO_PP_TIMEPROBE(id) +# undef TAO_FUNCTION_PP_TIMEPROBE +# define TAO_FUNCTION_PP_TIMEPROBE(X) +# endif /* TAO_SELECT_MINIMAL_TIMEPROBES */ + #else /* ACE_ENABLE_TIMEPROBES */ -# define TAO_PP_TIMEPROBE(id) -# define TAO_FUNCTION_PP_TIMEPROBE(X) + +# define TAO_PP_TIMEPROBE(id) +# define TAO_FUNCTION_PP_TIMEPROBE(X) +# define TAO_MINIMAL_TIMEPROBE(id) + #endif /* ACE_ENABLE_TIMEPROBES */ -#if defined (TAO_SELECT_PP_TIMEPROBES) -# undef ACE_TIMEPROBE -# define ACE_TIMEPROBE(id) -# undef ACE_FUNCTION_TIMEPROBE -# define ACE_FUNCTION_TIMEPROBE(X) -#endif /* TAO_SELECT_PP_TIMEPROBES */ #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once -- cgit v1.2.1