Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff probes.h @ 209:0c83ea8adefc
Close to compilable version of common_ancestor -- still includes HW dep stuff
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Sun, 04 Mar 2012 14:26:35 -0800 |
| parents | eaf7e4c58c9e |
| children |
line diff
1.1 --- a/probes.h Wed Feb 22 11:39:12 2012 -0800 1.2 +++ b/probes.h Sun Mar 04 14:26:35 2012 -0800 1.3 @@ -28,16 +28,16 @@ 1.4 1.5 int32 schedChoiceWasRecorded; 1.6 int32 coreNum; 1.7 - int32 procrID; 1.8 - float64 procrCreateSecs; 1.9 + int32 slaveID; 1.10 + float64 slaveCreateSecs; 1.11 1.12 - #ifdef STATS__USE_TSC_PROBES 1.13 + // #ifdef STATS__USE_TSC_PROBES 1.14 TSCount startStamp; 1.15 TSCount endStamp; 1.16 - #else 1.17 - struct timeval startStamp; 1.18 - struct timeval endStamp; 1.19 - #endif 1.20 +// #else 1.21 +// struct timeval startStamp; 1.22 +// struct timeval endStamp; 1.23 +// #endif 1.24 float64 startSecs; 1.25 float64 endSecs; 1.26 float64 interval; 1.27 @@ -45,136 +45,136 @@ 1.28 }; 1.29 1.30 1.31 +int32 1.32 +VMS_impl__create_single_interval_probe( char *nameStr, SlaveVP *animSlv ); 1.33 + 1.34 +int32 1.35 +VMS_impl__create_histogram_probe( int32 numBins, float64 startValue, 1.36 + float64 binWidth, char *nameStr, SlaveVP *animSlv ); 1.37 + 1.38 +int32 1.39 +VMS_impl__record_time_point_into_new_probe( char *nameStr, SlaveVP *animSlv); 1.40 + 1.41 +int32 1.42 +VMS_ext_impl__record_time_point_into_new_probe( char *nameStr ); 1.43 + 1.44 +void 1.45 +VMS_impl__free_probe( IntervalProbe *probe ); 1.46 + 1.47 +void 1.48 +VMS_impl__index_probe_by_its_name( int32 probeID, SlaveVP *animSlv ); 1.49 + 1.50 +IntervalProbe * 1.51 +VMS_impl__get_probe_by_name( char *probeName, SlaveVP *animSlv ); 1.52 + 1.53 +void 1.54 +VMS_impl__record_sched_choice_into_probe( int32 probeID, SlaveVP *animSlv ); 1.55 + 1.56 +void 1.57 +VMS_impl__record_interval_start_in_probe( int32 probeID ); 1.58 + 1.59 +void 1.60 +VMS_impl__record_interval_end_in_probe( int32 probeID ); 1.61 + 1.62 +void 1.63 +VMS_impl__print_stats_of_probe( int32 probeID ); 1.64 + 1.65 +void 1.66 +VMS_impl__print_stats_of_all_probes(); 1.67 + 1.68 1.69 //======================== Probes ============================= 1.70 // 1.71 // Use macros to allow turning probes off with a #define switch 1.72 +// This means probes have zero impact on performance when off 1.73 +//============================================================= 1.74 +#define VMS_App__record_time_point_into_new_probe VMS_WL__record_time_point_into_new_probe 1.75 +#define VMS_ext__record_time_point_into_new_probe 1.76 +#define VMS_App__create_single_interval_probe VMS_WL__create_single_interval_probe 1.77 +#define VMS_App__create_histogram_probe VMS_WL__create_histogram_probe 1.78 +#define VMS_App__index_probe_by_its_name VMS_WL__index_probe_by_its_name 1.79 +#define VMS_App__get_probe_by_name VMS_WL__get_probe_by_name 1.80 +#define VMS_App__record_sched_choice_into_probe VMS_WL__record_sched_choice_into_probe 1.81 +#define VMS_App__record_interval_start_in_probe VMS_WL__record_interval_start_in_probe 1.82 +#define VMS_App__record_interval_end_in_probe VMS_WL__record_interval_end_in_probe 1.83 +#define VMS_App__print_stats_of_probe VMS_WL__print_stats_of_probe 1.84 +#define VMS_App__print_stats_of_all_probes VMS_WL__print_stats_of_all_probes 1.85 + 1.86 #ifdef STATS__ENABLE_PROBES 1.87 -int32 1.88 -VMS_impl__record_time_point_into_new_probe( char *nameStr,SlaveVP *animPr); 1.89 -#define VMS__record_time_point_into_new_probe( nameStr, animPr ) \ 1.90 - VMS_impl__record_time_point_in_new_probe( nameStr, animPr ) 1.91 +#define VMS_WL__record_time_point_into_new_probe( nameStr, animSlv ) \ 1.92 + VMS_impl__record_time_point_in_new_probe( nameStr, animSlv ) 1.93 1.94 -int32 1.95 -VMS_ext_impl__record_time_point_into_new_probe( char *nameStr ); 1.96 #define VMS_ext__record_time_point_into_new_probe( nameStr ) \ 1.97 VMS_ext_impl__record_time_point_into_new_probe( nameStr ) 1.98 1.99 +#define VMS_WL__create_single_interval_probe( nameStr, animSlv ) \ 1.100 + VMS_impl__create_single_interval_probe( nameStr, animSlv ) 1.101 1.102 -int32 1.103 -VMS_impl__create_single_interval_probe( char *nameStr, SlaveVP *animPr ); 1.104 -#define VMS__create_single_interval_probe( nameStr, animPr ) \ 1.105 - VMS_impl__create_single_interval_probe( nameStr, animPr ) 1.106 - 1.107 - 1.108 -int32 1.109 -VMS_impl__create_histogram_probe( int32 numBins, float64 startValue, 1.110 - float64 binWidth, char *nameStr, SlaveVP *animPr ); 1.111 -#define VMS__create_histogram_probe( numBins, startValue, \ 1.112 - binWidth, nameStr, animPr ) \ 1.113 +#define VMS_WL__create_histogram_probe( numBins, startValue, \ 1.114 + binWidth, nameStr, animSlv ) \ 1.115 VMS_impl__create_histogram_probe( numBins, startValue, \ 1.116 - binWidth, nameStr, animPr ) 1.117 -void 1.118 -VMS_impl__free_probe( IntervalProbe *probe ); 1.119 -#define VMS__free_probe( probe ) \ 1.120 + binWidth, nameStr, animSlv ) 1.121 +#define VMS_int__free_probe( probe ) \ 1.122 VMS_impl__free_probe( probe ) 1.123 1.124 -void 1.125 -VMS_impl__index_probe_by_its_name( int32 probeID, SlaveVP *animPr ); 1.126 -#define VMS__index_probe_by_its_name( probeID, animPr ) \ 1.127 - VMS_impl__index_probe_by_its_name( probeID, animPr ) 1.128 +#define VMS_WL__index_probe_by_its_name( probeID, animSlv ) \ 1.129 + VMS_impl__index_probe_by_its_name( probeID, animSlv ) 1.130 1.131 -IntervalProbe * 1.132 -VMS_impl__get_probe_by_name( char *probeName, SlaveVP *animPr ); 1.133 -#define VMS__get_probe_by_name( probeID, animPr ) \ 1.134 - VMS_impl__get_probe_by_name( probeName, animPr ) 1.135 +#define VMS_WL__get_probe_by_name( probeID, animSlv ) \ 1.136 + VMS_impl__get_probe_by_name( probeName, animSlv ) 1.137 1.138 -void 1.139 -VMS_impl__record_sched_choice_into_probe( int32 probeID, SlaveVP *animPr ); 1.140 -#define VMS__record_sched_choice_into_probe( probeID, animPr ) \ 1.141 - VMS_impl__record_sched_choice_into_probe( probeID, animPr ) 1.142 +#define VMS_WL__record_sched_choice_into_probe( probeID, animSlv ) \ 1.143 + VMS_impl__record_sched_choice_into_probe( probeID, animSlv ) 1.144 1.145 -void 1.146 -VMS_impl__record_interval_start_in_probe( int32 probeID ); 1.147 -#define VMS__record_interval_start_in_probe( probeID ) \ 1.148 +#define VMS_WL__record_interval_start_in_probe( probeID ) \ 1.149 VMS_impl__record_interval_start_in_probe( probeID ) 1.150 1.151 -void 1.152 -VMS_impl__record_interval_end_in_probe( int32 probeID ); 1.153 -#define VMS__record_interval_end_in_probe( probeID ) \ 1.154 +#define VMS_WL__record_interval_end_in_probe( probeID ) \ 1.155 VMS_impl__record_interval_end_in_probe( probeID ) 1.156 1.157 -void 1.158 -VMS_impl__print_stats_of_probe( int32 probeID ); 1.159 -#define VMS__print_stats_of_probe( probeID ) \ 1.160 +#define VMS_WL__print_stats_of_probe( probeID ) \ 1.161 VMS_impl__print_stats_of_probe( probeID ) 1.162 1.163 -void 1.164 -VMS_impl__print_stats_of_all_probes(); 1.165 -#define VMS__print_stats_of_all_probes() \ 1.166 +#define VMS_WL__print_stats_of_all_probes() \ 1.167 VMS_impl__print_stats_of_all_probes() 1.168 1.169 1.170 #else 1.171 -int32 1.172 -VMS_impl__record_time_point_into_new_probe( char *nameStr,SlaveVP *animPr); 1.173 -#define VMS__record_time_point_into_new_probe( nameStr, animPr ) \ 1.174 +#define VMS_WL__record_time_point_into_new_probe( nameStr, animSlv ) \ 1.175 0 /* do nothing */ 1.176 1.177 -int32 1.178 -VMS_ext_impl__record_time_point_into_new_probe( char *nameStr ); 1.179 #define VMS_ext__record_time_point_into_new_probe( nameStr ) \ 1.180 0 /* do nothing */ 1.181 1.182 1.183 -int32 1.184 -VMS_impl__create_single_interval_probe( char *nameStr, SlaveVP *animPr ); 1.185 -#define VMS__create_single_interval_probe( nameStr, animPr ) \ 1.186 +#define VMS_WL__create_single_interval_probe( nameStr, animSlv ) \ 1.187 0 /* do nothing */ 1.188 1.189 1.190 -int32 1.191 -VMS_impl__create_histogram_probe( int32 numBins, float64 startValue, 1.192 - float64 binWidth, char *nameStr, SlaveVP *animPr ); 1.193 -#define VMS__create_histogram_probe( numBins, startValue, \ 1.194 - binWidth, nameStr, animPr ) \ 1.195 +#define VMS_WL__create_histogram_probe( numBins, startValue, \ 1.196 + binWidth, nameStr, animSlv ) \ 1.197 0 /* do nothing */ 1.198 1.199 -void 1.200 -VMS_impl__index_probe_by_its_name( int32 probeID, SlaveVP *animPr ); 1.201 -#define VMS__index_probe_by_its_name( probeID, animPr ) \ 1.202 +#define VMS_WL__index_probe_by_its_name( probeID, animSlv ) \ 1.203 /* do nothing */ 1.204 1.205 -IntervalProbe * 1.206 -VMS_impl__get_probe_by_name( char *probeName, SlaveVP *animPr ); 1.207 -#define VMS__get_probe_by_name( probeID, animPr ) \ 1.208 +#define VMS_WL__get_probe_by_name( probeID, animSlv ) \ 1.209 NULL /* do nothing */ 1.210 1.211 -void 1.212 -VMS_impl__record_sched_choice_into_probe( int32 probeID, SlaveVP *animPr ); 1.213 -#define VMS__record_sched_choice_into_probe( probeID, animPr ) \ 1.214 +#define VMS_WL__record_sched_choice_into_probe( probeID, animSlv ) \ 1.215 /* do nothing */ 1.216 1.217 -void 1.218 -VMS_impl__record_interval_start_in_probe( int32 probeID ); 1.219 -#define VMS__record_interval_start_in_probe( probeID ) \ 1.220 +#define VMS_WL__record_interval_start_in_probe( probeID ) \ 1.221 /* do nothing */ 1.222 1.223 -void 1.224 -VMS_impl__record_interval_end_in_probe( int32 probeID ); 1.225 -#define VMS__record_interval_end_in_probe( probeID ) \ 1.226 +#define VMS_WL__record_interval_end_in_probe( probeID ) \ 1.227 /* do nothing */ 1.228 1.229 -inline void doNothing(); 1.230 -void 1.231 -VMS_impl__print_stats_of_probe( int32 probeID ); 1.232 -#define VMS__print_stats_of_probe( probeID ) \ 1.233 - doNothing/* do nothing */ 1.234 +#define VMS_WL__print_stats_of_probe( probeID ) \ 1.235 + ; /* do nothing */ 1.236 1.237 -void 1.238 -VMS_impl__print_stats_of_all_probes(); 1.239 -#define VMS__print_stats_of_all_probes \ 1.240 - doNothing/* do nothing */ 1.241 +#define VMS_WL__print_stats_of_all_probes() \ 1.242 + ;/* do nothing */ 1.243 1.244 #endif /* defined STATS__ENABLE_PROBES */ 1.245
