Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff VMS.h @ 200:6db9e4898978
VMS name chgs -- added "WL" "PI" and "int" and split vms.h up
| author | Me@portablequad |
|---|---|
| date | Sun, 12 Feb 2012 01:49:33 -0800 |
| parents | 1738f190b7bb |
| children | cb888346c3e0 |
line diff
1.1 --- a/VMS.h Sat Feb 11 21:43:43 2012 -0800 1.2 +++ b/VMS.h Sun Feb 12 01:49:33 2012 -0800 1.3 @@ -11,121 +11,47 @@ 1.4 #define _GNU_SOURCE 1.5 1.6 #include "VMS_primitive_data_types.h" 1.7 -#include "../../C_Libraries/Queue_impl/PrivateQueue.h" 1.8 -#include "../../C_Libraries/Histogram/Histogram.h" 1.9 #include "../../C_Libraries/DynArray/DynArray.h" 1.10 #include "../../C_Libraries/Hash_impl/PrivateHash.h" 1.11 +#include "../../C_Libraries/Histogram/Histogram.h" 1.12 +#include "../../C_Libraries/Queue_impl/PrivateQueue.h" 1.13 #include "vmalloc.h" 1.14 1.15 #include <pthread.h> 1.16 #include <sys/time.h> 1.17 1.18 +//================= Defines: included from separate files ================= 1.19 +// 1.20 +// Note: ALL defines are in other files, none are in here 1.21 +// 1.22 +#include "VMS_defs.h" 1.23 1.24 -//=============================== Debug =================================== 1.25 + 1.26 + 1.27 +//================================ Typedefs ================================= 1.28 // 1.29 -//When SEQUENTIAL is defined, VMS does sequential exe in the main thread 1.30 -// It still does co-routines and all the mechanisms are the same, it just 1.31 -// has only a single thread and animates VPs one at a time 1.32 -//#define SEQUENTIAL 1.33 - 1.34 -//#define USE_WORK_STEALING 1.35 - 1.36 -//turns on the probe-instrumentation in the application -- when not 1.37 -// defined, the calls to the probe functions turn into comments 1.38 -#define STATS__ENABLE_PROBES 1.39 -//#define TURN_ON_DEBUG_PROBES 1.40 - 1.41 -//These defines turn types of bug messages on and off 1.42 -// be sure debug messages are un-commented (next block of defines) 1.43 -#define dbgAppFlow TRUE /* Top level flow of application code -- general*/ 1.44 -#define dbgProbes FALSE /* for issues inside probes themselves*/ 1.45 -#define dbgB2BMaster FALSE /* in coreloop, back to back master VPs*/ 1.46 -#define dbgRqstHdlr FALSE /* in request handler code*/ 1.47 - 1.48 -//Comment or un- the substitute half to turn on/off types of debug message 1.49 -#define DEBUG( bool, msg) \ 1.50 -// if( bool){ printf(msg); fflush(stdin);} 1.51 -#define DEBUG1( bool, msg, param) \ 1.52 -// if(bool){printf(msg, param); fflush(stdin);} 1.53 -#define DEBUG2( bool, msg, p1, p2) \ 1.54 -// if(bool) {printf(msg, p1, p2); fflush(stdin);} 1.55 - 1.56 -#define ERROR(msg) printf(msg); 1.57 -#define ERROR1(msg, param) printf(msg, param); 1.58 -#define ERROR2(msg, p1, p2) printf(msg, p1, p2); 1.59 - 1.60 -//=========================== STATS ======================= 1.61 - 1.62 - //when MEAS__TIME_STAMP_SUSP is defined, causes code to be inserted and 1.63 - // compiled-in that saves the low part of the time stamp count just before 1.64 - // suspending a processor and just after resuming that processorsrc/VPThread_lib/VMS/VMS.h:322: warning: previous declaration of ‘VMS__create_procr’ was here. It is 1.65 - // saved into a field added to VirtProcr. Have to sanity-check for 1.66 - // rollover of low portion into high portion. 1.67 -//#define MEAS__TIME_STAMP_SUSP 1.68 -//#define MEAS__TIME_MASTER 1.69 -#define MEAS__TIME_PLUGIN 1.70 -#define MEAS__TIME_MALLOC 1.71 -//#define MEAS__TIME_MASTER_LOCK 1.72 -#define MEAS__NUM_TIMES_TO_RUN 100000 1.73 - 1.74 - //For code that calculates normalization-offset between TSC counts of 1.75 - // different cores. 1.76 -#define NUM_TSC_ROUND_TRIPS 10 1.77 - 1.78 - 1.79 -//========================= Hardware related Constants ===================== 1.80 - //This value is the number of hardware threads in the shared memory 1.81 - // machine 1.82 -//#define NUM_CORES 8 1.83 - 1.84 - // tradeoff amortizing master fixed overhead vs imbalance potential 1.85 - // when work-stealing, can make bigger, at risk of losing cache affinity 1.86 -#define NUM_SCHED_SLOTS 5 1.87 - 1.88 -#define MIN_WORK_UNIT_CYCLES 20000 1.89 - 1.90 -#define MASTERLOCK_RETRIES 10000 1.91 - 1.92 - // stack size in virtual processors created 1.93 -#define VIRT_PROCR_STACK_SIZE 0x8000 /* 32K */ 1.94 - 1.95 - // memory for VMS__malloc 1.96 -#define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x10000000 /* 256M */ 1.97 - 1.98 -#define CACHE_LINE 64 1.99 -#define PAGE_SIZE 4096 1.100 - 1.101 - 1.102 -//============================== 1.103 - 1.104 -#define SUCCESS 0 1.105 - 1.106 -#define writeVMSQ writePrivQ 1.107 -#define readVMSQ readPrivQ 1.108 -#define makeVMSQ makeVMSPrivQ 1.109 -#define numInVMSQ numInPrivQ 1.110 -#define VMSQueueStruc PrivQueueStruc 1.111 - 1.112 - 1.113 - 1.114 -//=========================================================================== 1.115 typedef unsigned long long TSCount; 1.116 +typedef union 1.117 + { uint32 lowHigh[2]; 1.118 + uint64 longVal; 1.119 + } 1.120 +TSCountLowHigh; 1.121 1.122 typedef struct _SchedSlot SchedSlot; 1.123 typedef struct _VMSReqst VMSReqst; 1.124 -typedef struct _VirtProcr VirtProcr; 1.125 +typedef struct _SlaveVP SlaveVP; 1.126 typedef struct _IntervalProbe IntervalProbe; 1.127 typedef struct _GateStruc GateStruc; 1.128 1.129 1.130 -typedef VirtProcr * (*SlaveScheduler) ( void *, int ); //semEnv, coreIdx 1.131 -typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv 1.132 -typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr 1.133 -typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr 1.134 -typedef void (*ResumePrFnPtr) ( VirtProcr *, void * ); 1.135 +typedef SlaveVP * (*SlaveScheduler) ( void *, int ); //semEnv, coreIdx 1.136 +typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv 1.137 +typedef void (*VirtProcrFnPtr) ( void *, SlaveVP * ); //initData, animPr 1.138 +typedef void VirtProcrFn ( void *, SlaveVP * ); //initData, animPr 1.139 +typedef void (*ResumeVPFnPtr) ( SlaveVP *, void * ); 1.140 1.141 1.142 -//============= Requests =========== 1.143 +//============= Request Related =========== 1.144 // 1.145 1.146 enum VMSReqstType //avoid starting enums at 0, for debug reasons 1.147 @@ -154,7 +80,7 @@ 1.148 1.149 typedef struct 1.150 { enum VMSSemReqstType reqType; 1.151 - VirtProcr *requestingPr; 1.152 + SlaveVP *requestingPr; 1.153 char *nameStr; //for create probe 1.154 } 1.155 VMSSemReq; 1.156 @@ -166,14 +92,14 @@ 1.157 { 1.158 int workIsDone; 1.159 int needsProcrAssigned; 1.160 - VirtProcr *procrAssignedToSlot; 1.161 + SlaveVP *procrAssignedToSlot; 1.162 }; 1.163 //SchedSlot 1.164 1.165 /*WARNING: re-arranging this data structure could cause VP switching 1.166 * assembly code to fail -- hard-codes offsets of fields 1.167 */ 1.168 -struct _VirtProcr 1.169 +struct _SlaveVP 1.170 { int procrID; //for debugging -- count up each time create 1.171 int coreAnimatedBy; 1.172 void *startOfStack; 1.173 @@ -194,14 +120,19 @@ 1.174 void *dataRetFromReq;//values returned from plugin to VP go here 1.175 1.176 //=========== MEASUREMENT STUFF ========== 1.177 - #ifdef MEAS__TIME_STAMP_SUSP 1.178 - unsigned int preSuspTSCLow; 1.179 - unsigned int postSuspTSCLow; 1.180 - #endif 1.181 - #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/ 1.182 - unsigned int startMasterTSCLow;USE_GNU 1.183 - unsigned int endMasterTSCLow; 1.184 - #endif 1.185 + #ifdef MEAS__TIME_STAMP_SUSP 1.186 + uint32 preSuspTSCLow; 1.187 + uint32 postSuspTSCLow; 1.188 + #endif 1.189 + #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/ 1.190 + uint32 startMasterTSCLow;USE_GNU 1.191 + uint32 endMasterTSCLow; 1.192 + #endif 1.193 + #ifdef MEAS__TIME_2011_SYS 1.194 + TSCountLowHigh startSusp; 1.195 + uint64 totalSuspCycles; 1.196 + uint32 numGoodSusp; 1.197 + #endif 1.198 //======================================== 1.199 1.200 float64 createPtInSecs; //have space but don't use on some configs 1.201 @@ -215,49 +146,63 @@ 1.202 */ 1.203 typedef struct 1.204 { 1.205 + union{ //adds padding to put masterLock on its own cache-line to elim 1.206 + // false sharing (masterLock is most-accessed var in VMS) 1.207 + volatile int32 masterLock; 1.208 + char padding[CACHELINE_SIZE]; 1.209 + } masterLockUnion; 1.210 SlaveScheduler slaveScheduler; 1.211 RequestHandler requestHandler; 1.212 1.213 SchedSlot ***allSchedSlots; 1.214 VMSQueueStruc **readyToAnimateQs; 1.215 - VirtProcr **masterVPs; 1.216 + SlaveVP **masterVPs; 1.217 1.218 void *semanticEnv; 1.219 void *OSEventStruc; //for future, when add I/O to BLIS 1.220 - MallocProlog *freeListHead; 1.221 + MallocArrays *freeLists; 1.222 int32 amtOfOutstandingMem; //total currently allocated 1.223 1.224 void *coreLoopReturnPt;//addr to jump to to re-enter coreLoop 1.225 1.226 int32 setupComplete; 1.227 - volatile int32 masterLock; 1.228 - 1.229 - int32 numMasterInARow[NUM_CORES];//detect back-to-back masterVP 1.230 + //int32 numMasterInARow[NUM_CORES];//detect back-to-back masterVP 1.231 GateStruc *workStealingGates[ NUM_CORES ]; //concurrent work-steal 1.232 int32 workStealingLock; 1.233 1.234 - int32 numProcrsCreated; //gives ordering to processor creation 1.235 + int32 numVPsCreated; //gives ordering to processor creation 1.236 1.237 //=========== MEASUREMENT STUFF ============= 1.238 - IntervalProbe **intervalProbes; 1.239 - PrivDynArrayInfo *dynIntervalProbesInfo; 1.240 - HashTable *probeNameHashTbl; 1.241 - int32 masterCreateProbeID; 1.242 - float64 createPtInSecs; 1.243 - Histogram **measHists; 1.244 - PrivDynArrayInfo *measHistsInfo; 1.245 - #ifdef MEAS__TIME_PLUGIN 1.246 - Histogram *reqHdlrLowTimeHist; 1.247 - Histogram *reqHdlrHighTimeHist; 1.248 - #endif 1.249 - #ifdef MEAS__TIME_MALLOC 1.250 - Histogram *mallocTimeHist; 1.251 - Histogram *freeTimeHist; 1.252 - #endif 1.253 - #ifdef MEAS__TIME_MASTER_LOCK 1.254 - Histogram *masterLockLowTimeHist; 1.255 - Histogram *masterLockHighTimeHist; 1.256 - #endif 1.257 + IntervalProbe **intervalProbes; 1.258 + PrivDynArrayInfo *dynIntervalProbesInfo; 1.259 + HashTable *probeNameHashTbl; 1.260 + int32 masterCreateProbeID; 1.261 + float64 createPtInSecs; 1.262 + Histogram **measHists; 1.263 + PrivDynArrayInfo *measHistsInfo; 1.264 + #ifdef MEAS__TIME_PLUGIN 1.265 + Histogram *reqHdlrLowTimeHist; 1.266 + Histogram *reqHdlrHighTimeHist; 1.267 + #endif 1.268 + #ifdef MEAS__TIME_MALLOC 1.269 + Histogram *mallocTimeHist; 1.270 + Histogram *freeTimeHist; 1.271 + #endif 1.272 + #ifdef MEAS__TIME_MASTER_LOCK 1.273 + Histogram *masterLockLowTimeHist; 1.274 + Histogram *masterLockHighTimeHist; 1.275 + #endif 1.276 + #ifdef MEAS__TIME_2011_SYS 1.277 + TSCountLowHigh startMaster; 1.278 + uint64 totalMasterCycles; 1.279 + uint32 numMasterAnimations; 1.280 + TSCountLowHigh startReqHdlr; 1.281 + uint64 totalPluginCycles; 1.282 + uint32 numPluginAnimations; 1.283 + uint64 cyclesTillStartMasterLoop; 1.284 + TSCountLowHigh endMasterLoop; 1.285 + #endif 1.286 + //========================================== 1.287 } 1.288 MasterEnv; 1.289 1.290 @@ -281,7 +226,7 @@ 1.291 1.292 void * coreLoop( void *paramsIn ); //standard PThreads fn prototype 1.293 void * coreLoop_Seq( void *paramsIn ); //standard PThreads fn prototype 1.294 -void masterLoop( void *initData, VirtProcr *masterPr ); 1.295 +void masterLoop( void *initData, SlaveVP *masterVP ); 1.296 1.297 1.298 typedef struct 1.299 @@ -298,278 +243,93 @@ 1.300 1.301 1.302 1.303 -//===================== Global Vars =================== 1.304 +//============================= Global Vars ================================ 1.305 1.306 -volatile MasterEnv *_VMSMasterEnv; 1.307 +volatile MasterEnv *_VMSMasterEnv __align_to_cacheline__; 1.308 1.309 1.310 1.311 1.312 -//=========================== Function Prototypes ========================= 1.313 +//========================= Function Prototypes =========================== 1.314 1.315 1.316 //========== Setup and shutdown ========== 1.317 void 1.318 -VMS__init(); 1.319 +VMS_int__init(); 1.320 1.321 void 1.322 -VMS__init_Seq(); 1.323 +VMS_int__init_Seq(); 1.324 1.325 void 1.326 -VMS__start_the_work_then_wait_until_done(); 1.327 +VMS_WL__start_the_work_then_wait_until_done(); 1.328 1.329 void 1.330 -VMS__start_the_work_then_wait_until_done_Seq(); 1.331 +VMS_WL__start_the_work_then_wait_until_done_Seq(); 1.332 1.333 -inline VirtProcr * 1.334 -VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData ); 1.335 +inline SlaveVP * 1.336 +VMS_int__create_procr( VirtProcrFnPtr fnPtr, void *initialData ); 1.337 1.338 void 1.339 -VMS__dissipate_procr( VirtProcr *procrToDissipate ); 1.340 +VMS_int__dissipate_procr( SlaveVP *procrToDissipate ); 1.341 1.342 //Use this to create processor inside entry point & other places outside 1.343 // the VMS system boundary (IE, not run in slave nor Master) 1.344 -VirtProcr * 1.345 +SlaveVP * 1.346 VMS_ext__create_procr( VirtProcrFnPtr fnPtr, void *initialData ); 1.347 1.348 void 1.349 -VMS_ext__dissipate_procr( VirtProcr *procrToDissipate ); 1.350 +VMS_ext__dissipate_procr( SlaveVP *procrToDissipate ); 1.351 1.352 void 1.353 -VMS__throw_exception( char *msgStr, VirtProcr *reqstPr, VMSExcp *excpData ); 1.354 +VMS_PI__throw_exception( char *msgStr, SlaveVP *reqstPr, VMSExcp *excpData ); 1.355 1.356 void 1.357 -VMS__shutdown(); 1.358 +VMS_int__shutdown(); 1.359 1.360 void 1.361 -VMS__cleanup_at_end_of_shutdown(); 1.362 +VMS_int__cleanup_at_end_of_shutdown(); 1.363 1.364 void * 1.365 -VMS__give_sem_env_for( VirtProcr *animPr ); 1.366 +VMS_WL__give_sem_env_for( SlaveVP *animPr ); 1.367 1.368 1.369 //============== Request Related =============== 1.370 1.371 void 1.372 -VMS__suspend_procr( VirtProcr *callingPr ); 1.373 +VMS_int__suspend_procr( SlaveVP *callingPr ); 1.374 1.375 inline void 1.376 -VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, VirtProcr *callingPr ); 1.377 +VMS_WL__add_sem_request_in_mallocd_VMSReqst( void *semReqData, SlaveVP *callingPr ); 1.378 1.379 inline void 1.380 -VMS__send_sem_request( void *semReqData, VirtProcr *callingPr ); 1.381 +VMS_WL__send_sem_request( void *semReqData, SlaveVP *callingPr ); 1.382 1.383 void 1.384 -VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr ); 1.385 +VMS_WL__send_create_procr_req( void *semReqData, SlaveVP *reqstingPr ); 1.386 1.387 void inline 1.388 -VMS__send_dissipate_req( VirtProcr *prToDissipate ); 1.389 +VMS_WL__send_dissipate_req( SlaveVP *prToDissipate ); 1.390 1.391 inline void 1.392 -VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr ); 1.393 +VMS_WL__send_VMSSem_request( void *semReqData, SlaveVP *callingPr ); 1.394 1.395 VMSReqst * 1.396 -VMS__take_next_request_out_of( VirtProcr *procrWithReq ); 1.397 +VMS_PI__take_next_request_out_of( SlaveVP *procrWithReq ); 1.398 1.399 inline void * 1.400 -VMS__take_sem_reqst_from( VMSReqst *req ); 1.401 +VMS_PI__take_sem_reqst_from( VMSReqst *req ); 1.402 1.403 void inline 1.404 -VMS__handle_VMSSemReq( VMSReqst *req, VirtProcr *requestingPr, void *semEnv, 1.405 - ResumePrFnPtr resumePrFnPtr ); 1.406 +VMS_PI__handle_VMSSemReq( VMSReqst *req, SlaveVP *requestingPr, void *semEnv, 1.407 + ResumeVPFnPtr resumePrFnPtr ); 1.408 1.409 -//======================== STATS ====================== 1.410 +//======================== MEASUREMENT ====================== 1.411 +uint64 1.412 +VMS_WL__give_num_plugin_cycles(); 1.413 +uint32 1.414 +VMS_WL__give_num_plugin_animations(); 1.415 1.416 -//===== RDTSC wrapper ===== //Also runs with x86_64 code 1.417 1.418 -#define saveTimeStampCountInto(low, high) \ 1.419 - asm volatile("RDTSC; \ 1.420 - movl %%eax, %0; \ 1.421 - movl %%edx, %1;" \ 1.422 - /* outputs */ : "=m" (low), "=m" (high)\ 1.423 - /* inputs */ : \ 1.424 - /* clobber */ : "%eax", "%edx" \ 1.425 - ); 1.426 - 1.427 -#define saveLowTimeStampCountInto(low) \ 1.428 - asm volatile("RDTSC; \ 1.429 - movl %%eax, %0;" \ 1.430 - /* outputs */ : "=m" (low) \ 1.431 - /* inputs */ : \ 1.432 - /* clobber */ : "%eax", "%edx" \ 1.433 - ); 1.434 - 1.435 -//==================== 1.436 -#define makeAMeasHist( idx, name, numBins, startVal, binWidth ) \ 1.437 - makeHighestDynArrayIndexBeAtLeast( _VMSMasterEnv->measHistsInfo, idx ); \ 1.438 - _VMSMasterEnv->measHists[idx] = \ 1.439 - makeFixedBinHist( numBins, startVal, binWidth, name ); 1.440 - 1.441 - 1.442 -#define MEAS__SUB_CREATE /*turn on/off subtraction of create from plugin*/ 1.443 - 1.444 -#ifdef VPTHREAD 1.445 - 1.446 -//VPThread 1.447 -#define createHistIdx 0 1.448 -#define mutexLockHistIdx 1 1.449 -#define mutexUnlockHistIdx 2 1.450 -#define condWaitHistIdx 3 1.451 -#define condSignalHistIdx 4 1.452 - 1.453 -#define MakeTheMeasHists() \ 1.454 - _VMSMasterEnv->measHistsInfo = \ 1.455 - makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \ 1.456 - makeAMeasHist( createHistIdx, "create", 250, 0, 100 ) \ 1.457 - makeAMeasHist( mutexLockHistIdx, "mutex_lock", 50, 0, 100 ) \ 1.458 - makeAMeasHist( mutexUnlockHistIdx, "mutex_unlock", 50, 0, 100 ) \ 1.459 - makeAMeasHist( condWaitHistIdx, "cond_wait", 50, 0, 100 ) \ 1.460 - makeAMeasHist( condSignalHistIdx, "cond_signal", 50, 0, 100 ) 1.461 - 1.462 -#endif 1.463 - 1.464 - 1.465 -#ifdef VCILK 1.466 - 1.467 -//VCilk 1.468 -#define spawnHistIdx 0 1.469 -#define syncHistIdx 1 1.470 - 1.471 -#define MakeTheMeasHists() \ 1.472 - _VMSMasterEnv->measHistsInfo = \ 1.473 - makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \ 1.474 - makeAMeasHist( spawnHistIdx, "Spawn", 50, 0, 200 ) \ 1.475 - makeAMeasHist( syncHistIdx, "Sync", 50, 0, 200 ) 1.476 - 1.477 - 1.478 -#endif 1.479 - 1.480 -#ifdef SSR 1.481 - 1.482 -//SSR 1.483 -#define SendFromToHistIdx 0 1.484 -#define SendOfTypeHistIdx 1 1.485 -#define ReceiveFromToHistIdx 2 1.486 -#define ReceiveOfTypeHistIdx 3 1.487 - 1.488 -#define MakeTheMeasHists() \ 1.489 - _VMSMasterEnv->measHistsInfo = \ 1.490 - makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \ 1.491 - makeAMeasHist( SendFromToHistIdx, "SendFromTo", 50, 0, 100 ) \ 1.492 - makeAMeasHist( SendOfTypeHistIdx, "SendOfType", 50, 0, 100 ) \ 1.493 - makeAMeasHist( ReceiveFromToHistIdx,"ReceiveFromTo", 50, 0, 100 ) \ 1.494 - makeAMeasHist( ReceiveOfTypeHistIdx,"ReceiveOfType", 50, 0, 100 ) 1.495 - 1.496 -#endif 1.497 - 1.498 -//=========================================================================== 1.499 -//VPThread 1.500 - 1.501 - 1.502 -#define Meas_startCreate \ 1.503 - int32 startStamp, endStamp; \ 1.504 - saveLowTimeStampCountInto( startStamp ); \ 1.505 - 1.506 -#define Meas_endCreate \ 1.507 - saveLowTimeStampCountInto( endStamp ); \ 1.508 - addIntervalToHist( startStamp, endStamp, \ 1.509 - _VMSMasterEnv->measHists[ createHistIdx ] ); 1.510 - 1.511 -#define Meas_startMutexLock \ 1.512 - int32 startStamp, endStamp; \ 1.513 - saveLowTimeStampCountInto( startStamp ); \ 1.514 - 1.515 -#define Meas_endMutexLock \ 1.516 - saveLowTimeStampCountInto( endStamp ); \ 1.517 - addIntervalToHist( startStamp, endStamp, \ 1.518 - _VMSMasterEnv->measHists[ mutexLockHistIdx ] ); 1.519 - 1.520 -#define Meas_startMutexUnlock \ 1.521 - int32 startStamp, endStamp; \ 1.522 - saveLowTimeStampCountInto( startStamp ); \ 1.523 - 1.524 -#define Meas_endMutexUnlock \ 1.525 - saveLowTimeStampCountInto( endStamp ); \ 1.526 - addIntervalToHist( startStamp, endStamp, \ 1.527 - _VMSMasterEnv->measHists[ mutexUnlockHistIdx ] ); 1.528 - 1.529 -#define Meas_startCondWait \ 1.530 - int32 startStamp, endStamp; \ 1.531 - saveLowTimeStampCountInto( startStamp ); \ 1.532 - 1.533 -#define Meas_endCondWait \ 1.534 - saveLowTimeStampCountInto( endStamp ); \ 1.535 - addIntervalToHist( startStamp, endStamp, \ 1.536 - _VMSMasterEnv->measHists[ condWaitHistIdx ] ); 1.537 - 1.538 -#define Meas_startCondSignal \ 1.539 - int32 startStamp, endStamp; \ 1.540 - saveLowTimeStampCountInto( startStamp ); \ 1.541 - 1.542 -#define Meas_endCondSignal \ 1.543 - saveLowTimeStampCountInto( endStamp ); \ 1.544 - addIntervalToHist( startStamp, endStamp, \ 1.545 - _VMSMasterEnv->measHists[ condSignalHistIdx ] ); 1.546 - 1.547 -//=========================================================================== 1.548 -// VCilk 1.549 -#define Meas_startSpawn \ 1.550 - int32 startStamp, endStamp; \ 1.551 - saveLowTimeStampCountInto( startStamp ); \ 1.552 - 1.553 -#define Meas_endSpawn \ 1.554 - saveLowTimeStampCountInto( endStamp ); \ 1.555 - addIntervalToHist( startStamp, endStamp, \ 1.556 - _VMSMasterEnv->measHists[ spawnHistIdx ] ); 1.557 - 1.558 -#define Meas_startSync \ 1.559 - int32 startStamp, endStamp; \ 1.560 - saveLowTimeStampCountInto( startStamp ); \ 1.561 - 1.562 -#define Meas_endSync \ 1.563 - saveLowTimeStampCountInto( endStamp ); \ 1.564 - addIntervalToHist( startStamp, endStamp, \ 1.565 - _VMSMasterEnv->measHists[ syncHistIdx ] ); 1.566 - 1.567 -//=========================================================================== 1.568 -// SSR 1.569 -#define Meas_startSendFromTo \ 1.570 - int32 startStamp, endStamp; \ 1.571 - saveLowTimeStampCountInto( startStamp ); \ 1.572 - 1.573 -#define Meas_endSendFromTo \ 1.574 - saveLowTimeStampCountInto( endStamp ); \ 1.575 - addIntervalToHist( startStamp, endStamp, \ 1.576 - _VMSMasterEnv->measHists[ SendFromToHistIdx ] ); 1.577 - 1.578 -#define Meas_startSendOfType \ 1.579 - int32 startStamp, endStamp; \ 1.580 - saveLowTimeStampCountInto( startStamp ); \ 1.581 - 1.582 -#define Meas_endSendOfType \ 1.583 - saveLowTimeStampCountInto( endStamp ); \ 1.584 - addIntervalToHist( startStamp, endStamp, \ 1.585 - _VMSMasterEnv->measHists[ SendOfTypeHistIdx ] ); 1.586 - 1.587 -#define Meas_startReceiveFromTo \ 1.588 - int32 startStamp, endStamp; \ 1.589 - saveLowTimeStampCountInto( startStamp ); \ 1.590 - 1.591 -#define Meas_endReceiveFromTo \ 1.592 - saveLowTimeStampCountInto( endStamp ); \ 1.593 - addIntervalToHist( startStamp, endStamp, \ 1.594 - _VMSMasterEnv->measHists[ ReceiveFromToHistIdx ] ); 1.595 - 1.596 -#define Meas_startReceiveOfType \ 1.597 - int32 startStamp, endStamp; \ 1.598 - saveLowTimeStampCountInto( startStamp ); \ 1.599 - 1.600 -#define Meas_endReceiveOfType \ 1.601 - saveLowTimeStampCountInto( endStamp ); \ 1.602 - addIntervalToHist( startStamp, endStamp, \ 1.603 - _VMSMasterEnv->measHists[ReceiveOfTypeHistIdx ] ); 1.604 - 1.605 -//===== 1.606 1.607 #include "ProcrContext.h" 1.608 #include "probes.h"
