Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
view probes.h @ 208:eaf7e4c58c9e
Create common_ancestor brch -- all branches will be closed, then new ones
created with this as the common ancestor of all branches -- it is incomplete!
only code that is common to all HW and Feat and FeatDev branches is in here
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 22 Feb 2012 11:39:12 -0800 |
| parents | |
| children | 0c83ea8adefc |
line source
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
9 #ifndef _PROBES_H
10 #define _PROBES_H
11 #define _GNU_SOURCE
13 #include "VMS_primitive_data_types.h"
15 #include <sys/time.h>
17 /*Note on order of include files:
18 * This file relies on #defines that appear in other files..
19 */
22 //typedef struct _IntervalProbe IntervalProbe; //in VMS.h
24 struct _IntervalProbe
25 {
26 char *nameStr;
27 int32 probeID;
29 int32 schedChoiceWasRecorded;
30 int32 coreNum;
31 int32 procrID;
32 float64 procrCreateSecs;
34 #ifdef STATS__USE_TSC_PROBES
35 TSCount startStamp;
36 TSCount endStamp;
37 #else
38 struct timeval startStamp;
39 struct timeval endStamp;
40 #endif
41 float64 startSecs;
42 float64 endSecs;
43 float64 interval;
44 DblHist *hist;//if NULL, then is single interval probe
45 };
49 //======================== Probes =============================
50 //
51 // Use macros to allow turning probes off with a #define switch
52 #ifdef STATS__ENABLE_PROBES
53 int32
54 VMS_impl__record_time_point_into_new_probe( char *nameStr,SlaveVP *animPr);
55 #define VMS__record_time_point_into_new_probe( nameStr, animPr ) \
56 VMS_impl__record_time_point_in_new_probe( nameStr, animPr )
58 int32
59 VMS_ext_impl__record_time_point_into_new_probe( char *nameStr );
60 #define VMS_ext__record_time_point_into_new_probe( nameStr ) \
61 VMS_ext_impl__record_time_point_into_new_probe( nameStr )
64 int32
65 VMS_impl__create_single_interval_probe( char *nameStr, SlaveVP *animPr );
66 #define VMS__create_single_interval_probe( nameStr, animPr ) \
67 VMS_impl__create_single_interval_probe( nameStr, animPr )
70 int32
71 VMS_impl__create_histogram_probe( int32 numBins, float64 startValue,
72 float64 binWidth, char *nameStr, SlaveVP *animPr );
73 #define VMS__create_histogram_probe( numBins, startValue, \
74 binWidth, nameStr, animPr ) \
75 VMS_impl__create_histogram_probe( numBins, startValue, \
76 binWidth, nameStr, animPr )
77 void
78 VMS_impl__free_probe( IntervalProbe *probe );
79 #define VMS__free_probe( probe ) \
80 VMS_impl__free_probe( probe )
82 void
83 VMS_impl__index_probe_by_its_name( int32 probeID, SlaveVP *animPr );
84 #define VMS__index_probe_by_its_name( probeID, animPr ) \
85 VMS_impl__index_probe_by_its_name( probeID, animPr )
87 IntervalProbe *
88 VMS_impl__get_probe_by_name( char *probeName, SlaveVP *animPr );
89 #define VMS__get_probe_by_name( probeID, animPr ) \
90 VMS_impl__get_probe_by_name( probeName, animPr )
92 void
93 VMS_impl__record_sched_choice_into_probe( int32 probeID, SlaveVP *animPr );
94 #define VMS__record_sched_choice_into_probe( probeID, animPr ) \
95 VMS_impl__record_sched_choice_into_probe( probeID, animPr )
97 void
98 VMS_impl__record_interval_start_in_probe( int32 probeID );
99 #define VMS__record_interval_start_in_probe( probeID ) \
100 VMS_impl__record_interval_start_in_probe( probeID )
102 void
103 VMS_impl__record_interval_end_in_probe( int32 probeID );
104 #define VMS__record_interval_end_in_probe( probeID ) \
105 VMS_impl__record_interval_end_in_probe( probeID )
107 void
108 VMS_impl__print_stats_of_probe( int32 probeID );
109 #define VMS__print_stats_of_probe( probeID ) \
110 VMS_impl__print_stats_of_probe( probeID )
112 void
113 VMS_impl__print_stats_of_all_probes();
114 #define VMS__print_stats_of_all_probes() \
115 VMS_impl__print_stats_of_all_probes()
118 #else
119 int32
120 VMS_impl__record_time_point_into_new_probe( char *nameStr,SlaveVP *animPr);
121 #define VMS__record_time_point_into_new_probe( nameStr, animPr ) \
122 0 /* do nothing */
124 int32
125 VMS_ext_impl__record_time_point_into_new_probe( char *nameStr );
126 #define VMS_ext__record_time_point_into_new_probe( nameStr ) \
127 0 /* do nothing */
130 int32
131 VMS_impl__create_single_interval_probe( char *nameStr, SlaveVP *animPr );
132 #define VMS__create_single_interval_probe( nameStr, animPr ) \
133 0 /* do nothing */
136 int32
137 VMS_impl__create_histogram_probe( int32 numBins, float64 startValue,
138 float64 binWidth, char *nameStr, SlaveVP *animPr );
139 #define VMS__create_histogram_probe( numBins, startValue, \
140 binWidth, nameStr, animPr ) \
141 0 /* do nothing */
143 void
144 VMS_impl__index_probe_by_its_name( int32 probeID, SlaveVP *animPr );
145 #define VMS__index_probe_by_its_name( probeID, animPr ) \
146 /* do nothing */
148 IntervalProbe *
149 VMS_impl__get_probe_by_name( char *probeName, SlaveVP *animPr );
150 #define VMS__get_probe_by_name( probeID, animPr ) \
151 NULL /* do nothing */
153 void
154 VMS_impl__record_sched_choice_into_probe( int32 probeID, SlaveVP *animPr );
155 #define VMS__record_sched_choice_into_probe( probeID, animPr ) \
156 /* do nothing */
158 void
159 VMS_impl__record_interval_start_in_probe( int32 probeID );
160 #define VMS__record_interval_start_in_probe( probeID ) \
161 /* do nothing */
163 void
164 VMS_impl__record_interval_end_in_probe( int32 probeID );
165 #define VMS__record_interval_end_in_probe( probeID ) \
166 /* do nothing */
168 inline void doNothing();
169 void
170 VMS_impl__print_stats_of_probe( int32 probeID );
171 #define VMS__print_stats_of_probe( probeID ) \
172 doNothing/* do nothing */
174 void
175 VMS_impl__print_stats_of_all_probes();
176 #define VMS__print_stats_of_all_probes \
177 doNothing/* do nothing */
179 #endif /* defined STATS__ENABLE_PROBES */
181 #endif /* _PROBES_H */
