Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Timeprobe.h
blob9e3baf0f4777594ab941ce0bbc7d3779cd390268
2 //=============================================================================
3 /**
4 * @file Timeprobe.h
6 * @author Irfan Pyarali <irfan@cs.wustl.edu>
7 */
8 //=============================================================================
11 #ifndef TAO_TIMEPROBE_H
12 #define TAO_TIMEPROBE_H
13 #include /**/ "ace/pre.h"
15 #include "ace/config-all.h"
17 // Please see ace/Timeprobe.h for details on these #defines.
19 // #define TAO_ENABLE_TIMEPROBES
20 // #define TAO_MT_TIMEPROBES
21 // #define TAO_TSS_TIMEPROBES
23 #if defined (TAO_ENABLE_TIMEPROBES)
24 #define ACE_ENABLE_TIMEPROBES
25 #endif /* TAO_ENABLE_TIMEPROBES */
27 #if defined (TAO_MT_TIMEPROBES)
28 #define ACE_MT_TIMEPROBES
29 #endif /* TAO_MT_TIMEPROBES */
31 #if defined (TAO_TSS_TIMEPROBES)
32 #define ACE_TSS_TIMEPROBES
33 #endif /* TAO_TSS_TIMEPROBES */
35 #include "ace/Timeprobe.h"
37 // The macro for turning off all timeprobes except
38 // the ones that are pertinent to pluggable protocols.
39 //#define TAO_SELECT_PP_TIMEPROBES
41 // The macro for turning off all timeprobes except
42 // four - 2 to measure client send time and 2 to measure
43 // server upcall processing and return time.
44 // NOTE: If both this and the pluggable protocols macro
45 // above are defined, code below will undefine this macro.
46 // They should not both be defined at the same time.
47 //#define TAO_SELECT_MINIMAL_TIMEPROBES
50 #if defined (ACE_ENABLE_TIMEPROBES)
52 # define TAO_PP_TIMEPROBE(id) \
53 ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id)
54 # define TAO_FUNCTION_PP_TIMEPROBE(X) \
55 ACE_Function_Timeprobe<ACE_TIMEPROBE_WITH_LOCKING> \
56 function_timeprobe (*ACE_TIMEPROBE_SINGLETON::instance (), X)
57 # define TAO_MINIMAL_TIMEPROBE(id)
59 # if defined (TAO_SELECT_PP_TIMEPROBES)
60 # if defined TAO_SELECT_MINIMAL_TIMEPROBES
61 # undef TAO_SELECT_MINIMIAL_TIMEPROBES
62 # endif /* TAO_SELECT_MINIMAL_TIMEPROBES */
63 # undef ACE_TIMEPROBE
64 # define ACE_TIMEPROBE(id)
65 # undef ACE_FUNCTION_TIMEPROBE
66 # define ACE_FUNCTION_TIMEPROBE(X)
67 # define TAO_MINIMAL_TIMEPROBE(id)
68 # endif /* TAO_SELECT_PP_TIMEPROBES */
70 # if defined (TAO_SELECT_MINIMAL_TIMEPROBES)
71 # undef TAO_MINIMAL_TIMEPROBE
72 # define TAO_MINIMAL_TIMEPROBE(id) \
73 ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id)
74 # undef ACE_TIMEPROBE
75 # define ACE_TIMEPROBE(id)
76 # undef ACE_FUNCTION_TIMEPROBE
77 # define ACE_FUNCTION_TIMEPROBE(X)
78 # undef TAO_PP_TIMEPROBE
79 # define TAO_PP_TIMEPROBE(id)
80 # undef TAO_FUNCTION_PP_TIMEPROBE
81 # define TAO_FUNCTION_PP_TIMEPROBE(X)
82 # endif /* TAO_SELECT_MINIMAL_TIMEPROBES */
84 #else /* ACE_ENABLE_TIMEPROBES */
86 # define TAO_PP_TIMEPROBE(id)
87 # define TAO_FUNCTION_PP_TIMEPROBE(X)
88 # define TAO_MINIMAL_TIMEPROBE(id)
90 #endif /* ACE_ENABLE_TIMEPROBES */
93 #if !defined (ACE_LACKS_PRAGMA_ONCE)
94 # pragma once
95 #endif /* ACE_LACKS_PRAGMA_ONCE */
97 #include /**/ "ace/post.h"
98 #endif /* TAO_TIMEPROBE_H */