diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 0e49389337be86641451a5c36c24bf742fe97523 (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/tao/Timeprobe.h | |
parent | 8008dd09ccf88d4edef237a184a698cac42f2952 (diff) | |
download | ATCD-0e49389337be86641451a5c36c24bf742fe97523.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tao/Timeprobe.h')
-rw-r--r-- | TAO/tao/Timeprobe.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/TAO/tao/Timeprobe.h b/TAO/tao/Timeprobe.h new file mode 100644 index 00000000000..4d6efb6ad8b --- /dev/null +++ b/TAO/tao/Timeprobe.h @@ -0,0 +1,100 @@ + +//============================================================================= +/** + * @file Timeprobe.h + * + * $Id$ + * + * @author Irfan Pyarali <irfan@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef TAO_TIMEPROBE_H +#define TAO_TIMEPROBE_H +#include /**/ "ace/pre.h" + +#include "ace/config-all.h" + +// Please see ace/Timeprobe.h for details on these #defines. + +// #define TAO_ENABLE_TIMEPROBES +// #define TAO_MT_TIMEPROBES +// #define TAO_TSS_TIMEPROBES + +#if defined (TAO_ENABLE_TIMEPROBES) +#define ACE_ENABLE_TIMEPROBES +#endif /* TAO_ENABLE_TIMEPROBES */ + +#if defined (TAO_MT_TIMEPROBES) +#define ACE_MT_TIMEPROBES +#endif /* TAO_MT_TIMEPROBES */ + +#if defined (TAO_TSS_TIMEPROBES) +#define ACE_TSS_TIMEPROBES +#endif /* TAO_TSS_TIMEPROBES */ + +#include "ace/Timeprobe.h" + +// The macro for turning off all timeprobes except +// 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_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_MINIMAL_TIMEPROBE(id) + +#endif /* ACE_ENABLE_TIMEPROBES */ + + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "ace/post.h" +#endif /* TAO_TIMEPROBE_H */ |