diff options
Diffstat (limited to 'TAO/tao/Timeprobe.h')
-rw-r--r-- | TAO/tao/Timeprobe.h | 57 |
1 files changed, 47 insertions, 10 deletions
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<ACE_TIMEPROBE_WITH_LOCKING> 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<ACE_TIMEPROBE_WITH_LOCKING> \ + 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 |