summaryrefslogtreecommitdiff
path: root/TAO/tao/Timeprobe.h
blob: 9e3baf0f4777594ab941ce0bbc7d3779cd390268 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

//=============================================================================
/**
 *  @file    Timeprobe.h
 *
 *  @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 */