summaryrefslogtreecommitdiff
path: root/TAO/tao/Timeprobe.h
blob: 2967a794ebbdb90e53b1b89c910d3bd4142e6ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// $Id$

#ifndef TAO_TIMEPROBE_H
#define TAO_TIMEPROBE_H

// Please see ace/Timeprobe.h for details on these #defines.

//#define ACE_ENABLE_TIMEPROBES
//#define ACE_MT_TIMEPROBES
//#define ACE_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 */

#endif /* TAO_TIMEPROBE_H */