annotate VMS.h @ 191:934d2b52ab0b

Rearrangement: removed sub-repositories
author Me@portablequad
date Tue, 07 Feb 2012 12:54:28 -0800
parents 9661b8cc8318
children 7523ee70d66c 1738f190b7bb
rev   line source
Me@178 1 /*
Me@178 2 * Copyright 2009 OpenSourceStewardshipFoundation.org
Me@178 3 * Licensed under GNU General Public License version 2
Me@178 4 *
Me@178 5 * Author: seanhalle@yahoo.com
Me@178 6 *
Me@178 7 */
Me@178 8
Me@178 9 #ifndef _VMS_H
Me@178 10 #define _VMS_H
Me@178 11 #define _GNU_SOURCE
Me@178 12
Me@178 13 #include "VMS_primitive_data_types.h"
Me@178 14 #include "Queue_impl/PrivateQueue.h"
Me@178 15 #include "Histogram/Histogram.h"
Me@178 16 #include "DynArray/DynArray.h"
Me@178 17 #include "Hash_impl/PrivateHash.h"
Me@178 18 #include "vmalloc.h"
Me@178 19
Me@178 20 #include <pthread.h>
Me@178 21 #include <sys/time.h>
Me@178 22
Me@178 23
Me@178 24 //=============================== Debug ===================================
Me@178 25 //
Me@178 26 //When SEQUENTIAL is defined, VMS does sequential exe in the main thread
Me@178 27 // It still does co-routines and all the mechanisms are the same, it just
Me@178 28 // has only a single thread and animates VPs one at a time
Me@178 29 //#define SEQUENTIAL
Me@178 30
Me@178 31 //#define USE_WORK_STEALING
Me@178 32
Me@178 33 //turns on the probe-instrumentation in the application -- when not
Me@178 34 // defined, the calls to the probe functions turn into comments
Me@178 35 #define STATS__ENABLE_PROBES
Me@178 36 //#define TURN_ON_DEBUG_PROBES
Me@178 37
Me@178 38 //These defines turn types of bug messages on and off
Me@178 39 // be sure debug messages are un-commented (next block of defines)
Me@178 40 #define dbgAppFlow TRUE /* Top level flow of application code -- general*/
Me@178 41 #define dbgProbes FALSE /* for issues inside probes themselves*/
Me@178 42 #define dbgB2BMaster FALSE /* in coreloop, back to back master VPs*/
Me@178 43 #define dbgRqstHdlr FALSE /* in request handler code*/
Me@178 44
Me@178 45 //Comment or un- the substitute half to turn on/off types of debug message
Me@178 46 #define DEBUG( bool, msg) \
Me@178 47 // if( bool){ printf(msg); fflush(stdin);}
Me@178 48 #define DEBUG1( bool, msg, param) \
Me@178 49 // if(bool){printf(msg, param); fflush(stdin);}
Me@178 50 #define DEBUG2( bool, msg, p1, p2) \
Me@178 51 // if(bool) {printf(msg, p1, p2); fflush(stdin);}
Me@178 52
Me@178 53 #define ERROR(msg) printf(msg);
Me@178 54 #define ERROR1(msg, param) printf(msg, param);
Me@178 55 #define ERROR2(msg, p1, p2) printf(msg, p1, p2);
Me@178 56
Me@178 57 //=========================== STATS =======================
Me@178 58
Me@178 59 //when MEAS__TIME_STAMP_SUSP is defined, causes code to be inserted and
Me@178 60 // compiled-in that saves the low part of the time stamp count just before
Me@178 61 // 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
Me@178 62 // saved into a field added to VirtProcr. Have to sanity-check for
Me@178 63 // rollover of low portion into high portion.
Me@178 64 //#define MEAS__TIME_STAMP_SUSP
Me@178 65 //#define MEAS__TIME_MASTER
Me@178 66 #define MEAS__TIME_PLUGIN
Me@178 67 #define MEAS__TIME_MALLOC
Me@178 68 //#define MEAS__TIME_MASTER_LOCK
Me@178 69 #define MEAS__NUM_TIMES_TO_RUN 100000
Me@178 70
Me@178 71 //For code that calculates normalization-offset between TSC counts of
Me@178 72 // different cores.
Me@178 73 #define NUM_TSC_ROUND_TRIPS 10
Me@178 74
Me@178 75
Me@178 76 //========================= Hardware related Constants =====================
Me@178 77 //This value is the number of hardware threads in the shared memory
Me@178 78 // machine
Me@178 79 //#define NUM_CORES 8
Me@178 80
Me@178 81 // tradeoff amortizing master fixed overhead vs imbalance potential
Me@178 82 // when work-stealing, can make bigger, at risk of losing cache affinity
Me@178 83 #define NUM_SCHED_SLOTS 5
Me@178 84
Me@178 85 #define MIN_WORK_UNIT_CYCLES 20000
Me@178 86
Me@178 87 #define MASTERLOCK_RETRIES 10000
Me@178 88
Me@178 89 // stack size in virtual processors created
Me@178 90 #define VIRT_PROCR_STACK_SIZE 0x8000 /* 32K */
Me@178 91
Me@178 92 // memory for VMS__malloc
Me@178 93 #define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x10000000 /* 256M */
Me@178 94
Me@178 95 #define CACHE_LINE 64
Me@178 96 #define PAGE_SIZE 4096
Me@178 97
Me@178 98
Me@178 99 //==============================
Me@178 100
Me@178 101 #define SUCCESS 0
Me@178 102
Me@178 103 #define writeVMSQ writePrivQ
Me@178 104 #define readVMSQ readPrivQ
Me@178 105 #define makeVMSQ makeVMSPrivQ
Me@178 106 #define numInVMSQ numInPrivQ
Me@178 107 #define VMSQueueStruc PrivQueueStruc
Me@178 108
Me@178 109
Me@178 110
Me@178 111 //===========================================================================
Me@178 112 typedef unsigned long long TSCount;
Me@178 113
Me@178 114 typedef struct _SchedSlot SchedSlot;
Me@178 115 typedef struct _VMSReqst VMSReqst;
Me@178 116 typedef struct _VirtProcr VirtProcr;
Me@178 117 typedef struct _IntervalProbe IntervalProbe;
Me@178 118 typedef struct _GateStruc GateStruc;
Me@178 119
Me@178 120
Me@178 121 typedef VirtProcr * (*SlaveScheduler) ( void *, int ); //semEnv, coreIdx
Me@178 122 typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv
Me@178 123 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr
Me@178 124 typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr
Me@178 125 typedef void (*ResumePrFnPtr) ( VirtProcr *, void * );
Me@178 126
Me@178 127
Me@178 128 //============= Requests ===========
Me@178 129 //
Me@178 130
Me@178 131 enum VMSReqstType //avoid starting enums at 0, for debug reasons
Me@178 132 {
Me@178 133 semantic = 1,
Me@178 134 createReq,
Me@178 135 dissipate,
Me@178 136 VMSSemantic //goes with VMSSemReqst below
Me@178 137 };
Me@178 138
Me@178 139 struct _VMSReqst
Me@178 140 {
Me@178 141 enum VMSReqstType reqType;//used for dissipate and in future for IO requests
Me@178 142 void *semReqData;
Me@178 143
Me@178 144 VMSReqst *nextReqst;
Me@178 145 };
Me@178 146 //VMSReqst
Me@178 147
Me@178 148 enum VMSSemReqstType //These are equivalent to semantic requests, but for
Me@178 149 { // VMS's services available directly to app, like OS
Me@178 150 createProbe = 1, // and probe services -- like a VMS-wide built-in lang
Me@178 151 openFile,
Me@178 152 otherIO
Me@178 153 };
Me@178 154
Me@178 155 typedef struct
Me@178 156 { enum VMSSemReqstType reqType;
Me@178 157 VirtProcr *requestingPr;
Me@178 158 char *nameStr; //for create probe
Me@178 159 }
Me@178 160 VMSSemReq;
Me@178 161
Me@178 162
Me@178 163 //==================== Core data structures ===================
Me@178 164
Me@178 165 struct _SchedSlot
Me@178 166 {
Me@178 167 int workIsDone;
Me@178 168 int needsProcrAssigned;
Me@178 169 VirtProcr *procrAssignedToSlot;
Me@178 170 };
Me@178 171 //SchedSlot
Me@178 172
Me@178 173 /*WARNING: re-arranging this data structure could cause VP switching
Me@178 174 * assembly code to fail -- hard-codes offsets of fields
Me@178 175 */
Me@178 176 struct _VirtProcr
Me@178 177 { int procrID; //for debugging -- count up each time create
Me@178 178 int coreAnimatedBy;
Me@178 179 void *startOfStack;
Me@178 180 void *stackPtr;
Me@178 181 void *framePtr;
Me@178 182 void *nextInstrPt;
Me@178 183
Me@178 184 void *coreLoopStartPt; //allows proto-runtime to be linked later
Me@178 185 void *coreLoopFramePtr; //restore before jmp back to core loop
Me@178 186 void *coreLoopStackPtr; //restore before jmp back to core loop
Me@178 187
Me@178 188 void *initialData;
Me@178 189
Me@178 190 SchedSlot *schedSlot;
Me@178 191 VMSReqst *requests;
Me@178 192
Me@178 193 void *semanticData; //this livesUSE_GNU here for the life of VP
Me@178 194 void *dataRetFromReq;//values returned from plugin to VP go here
Me@178 195
Me@178 196 //=========== MEASUREMENT STUFF ==========
Me@178 197 #ifdef MEAS__TIME_STAMP_SUSP
Me@178 198 unsigned int preSuspTSCLow;
Me@178 199 unsigned int postSuspTSCLow;
Me@178 200 #endif
Me@178 201 #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/
Me@178 202 unsigned int startMasterTSCLow;USE_GNU
Me@178 203 unsigned int endMasterTSCLow;
Me@178 204 #endif
Me@178 205 //========================================
Me@178 206
Me@178 207 float64 createPtInSecs; //have space but don't use on some configs
Me@178 208 };
Me@178 209 //VirtProcr
Me@178 210
Me@178 211
Me@178 212 /*WARNING: re-arranging this data structure could cause VP-switching
Me@178 213 * assembly code to fail -- hard-codes offsets of fields
Me@178 214 * (because -O3 messes with things otherwise)
Me@178 215 */
Me@178 216 typedef struct
Me@178 217 {
Me@178 218 SlaveScheduler slaveScheduler;
Me@178 219 RequestHandler requestHandler;
Me@178 220
Me@178 221 SchedSlot ***allSchedSlots;
Me@178 222 VMSQueueStruc **readyToAnimateQs;
Me@178 223 VirtProcr **masterVPs;
Me@178 224
Me@178 225 void *semanticEnv;
Me@178 226 void *OSEventStruc; //for future, when add I/O to BLIS
Me@178 227 MallocProlog *freeListHead;
Me@178 228 int32 amtOfOutstandingMem; //total currently allocated
Me@178 229
Me@178 230 void *coreLoopReturnPt;//addr to jump to to re-enter coreLoop
Me@178 231
Me@178 232 int32 setupComplete;
Me@178 233 volatile int32 masterLock;
Me@178 234
Me@178 235 int32 numMasterInARow[NUM_CORES];//detect back-to-back masterVP
Me@178 236 GateStruc *workStealingGates[ NUM_CORES ]; //concurrent work-steal
Me@178 237 int32 workStealingLock;
Me@178 238
Me@178 239 int32 numProcrsCreated; //gives ordering to processor creation
Me@178 240
Me@178 241 //=========== MEASUREMENT STUFF =============
Me@178 242 IntervalProbe **intervalProbes;
Me@178 243 PrivDynArrayInfo *dynIntervalProbesInfo;
Me@178 244 HashTable *probeNameHashTbl;
Me@178 245 int32 masterCreateProbeID;
Me@178 246 float64 createPtInSecs;
Me@178 247 Histogram **measHists;
Me@178 248 PrivDynArrayInfo *measHistsInfo;
Me@178 249 #ifdef MEAS__TIME_PLUGIN
Me@178 250 Histogram *reqHdlrLowTimeHist;
Me@178 251 Histogram *reqHdlrHighTimeHist;
Me@178 252 #endif
Me@178 253 #ifdef MEAS__TIME_MALLOC
Me@178 254 Histogram *mallocTimeHist;
Me@178 255 Histogram *freeTimeHist;
Me@178 256 #endif
Me@178 257 #ifdef MEAS__TIME_MASTER_LOCK
Me@178 258 Histogram *masterLockLowTimeHist;
Me@178 259 Histogram *masterLockHighTimeHist;
Me@178 260 #endif
Me@178 261 }
Me@178 262 MasterEnv;
Me@178 263
Me@178 264 //========================= Extra Stuff Data Strucs =======================
Me@178 265 typedef struct
Me@178 266 {
Me@178 267
Me@178 268 }
Me@178 269 VMSExcp;
Me@178 270
Me@178 271 struct _GateStruc
Me@178 272 {
Me@178 273 int32 gateClosed;
Me@178 274 int32 preGateProgress;
Me@178 275 int32 waitProgress;
Me@178 276 int32 exitProgress;
Me@178 277 };
Me@178 278 //GateStruc
Me@178 279
Me@178 280 //======================= OS Thread related ===============================
Me@178 281
Me@178 282 void * coreLoop( void *paramsIn ); //standard PThreads fn prototype
Me@178 283 void * coreLoop_Seq( void *paramsIn ); //standard PThreads fn prototype
Me@178 284 void masterLoop( void *initData, VirtProcr *masterPr );
Me@178 285
Me@178 286
Me@178 287 typedef struct
Me@178 288 {
Me@178 289 void *endThdPt;
Me@178 290 unsigned int coreNum;
Me@178 291 }
Me@178 292 ThdParams;
Me@178 293
Me@178 294 pthread_t coreLoopThdHandles[ NUM_CORES ]; //pthread's virt-procr state
Me@178 295 ThdParams *coreLoopThdParams [ NUM_CORES ];
Me@178 296 pthread_mutex_t suspendLock;
Me@178 297 pthread_cond_t suspend_cond;
Me@178 298
Me@178 299
Me@178 300
Me@178 301 //===================== Global Vars ===================
Me@178 302
Me@178 303 volatile MasterEnv *_VMSMasterEnv;
Me@178 304
Me@178 305
Me@178 306
Me@178 307
Me@178 308 //=========================== Function Prototypes =========================
Me@178 309
Me@178 310
Me@178 311 //========== Setup and shutdown ==========
Me@178 312 void
Me@178 313 VMS__init();
Me@178 314
Me@178 315 void
Me@178 316 VMS__init_Seq();
Me@178 317
Me@178 318 void
Me@178 319 VMS__start_the_work_then_wait_until_done();
Me@178 320
Me@178 321 void
Me@178 322 VMS__start_the_work_then_wait_until_done_Seq();
Me@178 323
Me@178 324 inline VirtProcr *
Me@178 325 VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData );
Me@178 326
Me@178 327 void
Me@178 328 VMS__dissipate_procr( VirtProcr *procrToDissipate );
Me@178 329
Me@178 330 //Use this to create processor inside entry point & other places outside
Me@178 331 // the VMS system boundary (IE, not run in slave nor Master)
Me@178 332 VirtProcr *
Me@178 333 VMS_ext__create_procr( VirtProcrFnPtr fnPtr, void *initialData );
Me@178 334
Me@178 335 void
Me@178 336 VMS_ext__dissipate_procr( VirtProcr *procrToDissipate );
Me@178 337
Me@178 338 void
Me@178 339 VMS__throw_exception( char *msgStr, VirtProcr *reqstPr, VMSExcp *excpData );
Me@178 340
Me@178 341 void
Me@178 342 VMS__shutdown();
Me@178 343
Me@178 344 void
Me@178 345 VMS__cleanup_at_end_of_shutdown();
Me@178 346
Me@178 347 void *
Me@178 348 VMS__give_sem_env_for( VirtProcr *animPr );
Me@178 349
Me@178 350
Me@178 351 //============== Request Related ===============
Me@178 352
Me@178 353 void
Me@178 354 VMS__suspend_procr( VirtProcr *callingPr );
Me@178 355
Me@178 356 inline void
Me@178 357 VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, VirtProcr *callingPr );
Me@178 358
Me@178 359 inline void
Me@178 360 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr );
Me@178 361
Me@178 362 void
Me@178 363 VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr );
Me@178 364
Me@178 365 void inline
Me@178 366 VMS__send_dissipate_req( VirtProcr *prToDissipate );
Me@178 367
Me@178 368 inline void
Me@178 369 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr );
Me@178 370
Me@178 371 VMSReqst *
Me@178 372 VMS__take_next_request_out_of( VirtProcr *procrWithReq );
Me@178 373
Me@178 374 inline void *
Me@178 375 VMS__take_sem_reqst_from( VMSReqst *req );
Me@178 376
Me@178 377 void inline
Me@178 378 VMS__handle_VMSSemReq( VMSReqst *req, VirtProcr *requestingPr, void *semEnv,
Me@178 379 ResumePrFnPtr resumePrFnPtr );
Me@178 380
Me@178 381 //======================== STATS ======================
Me@178 382
Me@178 383 //===== RDTSC wrapper ===== //Also runs with x86_64 code
Me@178 384
Me@178 385 #define saveTimeStampCountInto(low, high) \
Me@178 386 asm volatile("RDTSC; \
Me@178 387 movl %%eax, %0; \
Me@178 388 movl %%edx, %1;" \
Me@178 389 /* outputs */ : "=m" (low), "=m" (high)\
Me@178 390 /* inputs */ : \
Me@178 391 /* clobber */ : "%eax", "%edx" \
Me@178 392 );
Me@178 393
Me@178 394 #define saveLowTimeStampCountInto(low) \
Me@178 395 asm volatile("RDTSC; \
Me@178 396 movl %%eax, %0;" \
Me@178 397 /* outputs */ : "=m" (low) \
Me@178 398 /* inputs */ : \
Me@178 399 /* clobber */ : "%eax", "%edx" \
Me@178 400 );
Me@178 401
Me@178 402 //====================
Me@178 403 #define makeAMeasHist( idx, name, numBins, startVal, binWidth ) \
Me@178 404 makeHighestDynArrayIndexBeAtLeast( _VMSMasterEnv->measHistsInfo, idx ); \
Me@178 405 _VMSMasterEnv->measHists[idx] = \
Me@178 406 makeFixedBinHist( numBins, startVal, binWidth, name );
Me@178 407
Me@178 408
Me@178 409 #define MEAS__SUB_CREATE /*turn on/off subtraction of create from plugin*/
Me@178 410
Me@178 411 #ifdef VPTHREAD
Me@178 412
Me@178 413 //VPThread
Me@178 414 #define createHistIdx 0
Me@178 415 #define mutexLockHistIdx 1
Me@178 416 #define mutexUnlockHistIdx 2
Me@178 417 #define condWaitHistIdx 3
Me@178 418 #define condSignalHistIdx 4
Me@178 419
Me@178 420 #define MakeTheMeasHists() \
Me@178 421 _VMSMasterEnv->measHistsInfo = \
Me@178 422 makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \
Me@178 423 makeAMeasHist( createHistIdx, "create", 250, 0, 100 ) \
Me@178 424 makeAMeasHist( mutexLockHistIdx, "mutex_lock", 50, 0, 100 ) \
Me@178 425 makeAMeasHist( mutexUnlockHistIdx, "mutex_unlock", 50, 0, 100 ) \
Me@178 426 makeAMeasHist( condWaitHistIdx, "cond_wait", 50, 0, 100 ) \
Me@178 427 makeAMeasHist( condSignalHistIdx, "cond_signal", 50, 0, 100 )
Me@178 428
Me@178 429 #endif
Me@178 430
Me@178 431
Me@178 432 #ifdef VCILK
Me@178 433
Me@178 434 //VCilk
Me@178 435 #define spawnHistIdx 0
Me@178 436 #define syncHistIdx 1
Me@178 437
Me@178 438 #define MakeTheMeasHists() \
Me@178 439 _VMSMasterEnv->measHistsInfo = \
Me@178 440 makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \
Me@178 441 makeAMeasHist( spawnHistIdx, "Spawn", 50, 0, 200 ) \
Me@178 442 makeAMeasHist( syncHistIdx, "Sync", 50, 0, 200 )
Me@178 443
Me@178 444
Me@178 445 #endif
Me@178 446
Me@178 447 #ifdef SSR
Me@178 448
Me@178 449 //SSR
Me@178 450 #define SendFromToHistIdx 0
Me@178 451 #define SendOfTypeHistIdx 1
Me@178 452 #define ReceiveFromToHistIdx 2
Me@178 453 #define ReceiveOfTypeHistIdx 3
Me@178 454
Me@178 455 #define MakeTheMeasHists() \
Me@178 456 _VMSMasterEnv->measHistsInfo = \
Me@178 457 makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \
Me@178 458 makeAMeasHist( SendFromToHistIdx, "SendFromTo", 50, 0, 100 ) \
Me@178 459 makeAMeasHist( SendOfTypeHistIdx, "SendOfType", 50, 0, 100 ) \
Me@178 460 makeAMeasHist( ReceiveFromToHistIdx,"ReceiveFromTo", 50, 0, 100 ) \
Me@178 461 makeAMeasHist( ReceiveOfTypeHistIdx,"ReceiveOfType", 50, 0, 100 )
Me@178 462
Me@178 463 #endif
Me@178 464
Me@178 465 //===========================================================================
Me@178 466 //VPThread
Me@178 467
Me@178 468
Me@178 469 #define Meas_startCreate \
Me@178 470 int32 startStamp, endStamp; \
Me@178 471 saveLowTimeStampCountInto( startStamp ); \
Me@178 472
Me@178 473 #define Meas_endCreate \
Me@178 474 saveLowTimeStampCountInto( endStamp ); \
Me@178 475 addIntervalToHist( startStamp, endStamp, \
Me@178 476 _VMSMasterEnv->measHists[ createHistIdx ] );
Me@178 477
Me@178 478 #define Meas_startMutexLock \
Me@178 479 int32 startStamp, endStamp; \
Me@178 480 saveLowTimeStampCountInto( startStamp ); \
Me@178 481
Me@178 482 #define Meas_endMutexLock \
Me@178 483 saveLowTimeStampCountInto( endStamp ); \
Me@178 484 addIntervalToHist( startStamp, endStamp, \
Me@178 485 _VMSMasterEnv->measHists[ mutexLockHistIdx ] );
Me@178 486
Me@178 487 #define Meas_startMutexUnlock \
Me@178 488 int32 startStamp, endStamp; \
Me@178 489 saveLowTimeStampCountInto( startStamp ); \
Me@178 490
Me@178 491 #define Meas_endMutexUnlock \
Me@178 492 saveLowTimeStampCountInto( endStamp ); \
Me@178 493 addIntervalToHist( startStamp, endStamp, \
Me@178 494 _VMSMasterEnv->measHists[ mutexUnlockHistIdx ] );
Me@178 495
Me@178 496 #define Meas_startCondWait \
Me@178 497 int32 startStamp, endStamp; \
Me@178 498 saveLowTimeStampCountInto( startStamp ); \
Me@178 499
Me@178 500 #define Meas_endCondWait \
Me@178 501 saveLowTimeStampCountInto( endStamp ); \
Me@178 502 addIntervalToHist( startStamp, endStamp, \
Me@178 503 _VMSMasterEnv->measHists[ condWaitHistIdx ] );
Me@178 504
Me@178 505 #define Meas_startCondSignal \
Me@178 506 int32 startStamp, endStamp; \
Me@178 507 saveLowTimeStampCountInto( startStamp ); \
Me@178 508
Me@178 509 #define Meas_endCondSignal \
Me@178 510 saveLowTimeStampCountInto( endStamp ); \
Me@178 511 addIntervalToHist( startStamp, endStamp, \
Me@178 512 _VMSMasterEnv->measHists[ condSignalHistIdx ] );
Me@178 513
Me@178 514 //===========================================================================
Me@178 515 // VCilk
Me@178 516 #define Meas_startSpawn \
Me@178 517 int32 startStamp, endStamp; \
Me@178 518 saveLowTimeStampCountInto( startStamp ); \
Me@178 519
Me@178 520 #define Meas_endSpawn \
Me@178 521 saveLowTimeStampCountInto( endStamp ); \
Me@178 522 addIntervalToHist( startStamp, endStamp, \
Me@178 523 _VMSMasterEnv->measHists[ spawnHistIdx ] );
Me@178 524
Me@178 525 #define Meas_startSync \
Me@178 526 int32 startStamp, endStamp; \
Me@178 527 saveLowTimeStampCountInto( startStamp ); \
Me@178 528
Me@178 529 #define Meas_endSync \
Me@178 530 saveLowTimeStampCountInto( endStamp ); \
Me@178 531 addIntervalToHist( startStamp, endStamp, \
Me@178 532 _VMSMasterEnv->measHists[ syncHistIdx ] );
Me@178 533
Me@178 534 //===========================================================================
Me@178 535 // SSR
Me@178 536 #define Meas_startSendFromTo \
Me@178 537 int32 startStamp, endStamp; \
Me@178 538 saveLowTimeStampCountInto( startStamp ); \
Me@178 539
Me@178 540 #define Meas_endSendFromTo \
Me@178 541 saveLowTimeStampCountInto( endStamp ); \
Me@178 542 addIntervalToHist( startStamp, endStamp, \
Me@178 543 _VMSMasterEnv->measHists[ SendFromToHistIdx ] );
Me@178 544
Me@178 545 #define Meas_startSendOfType \
Me@178 546 int32 startStamp, endStamp; \
Me@178 547 saveLowTimeStampCountInto( startStamp ); \
Me@178 548
Me@178 549 #define Meas_endSendOfType \
Me@178 550 saveLowTimeStampCountInto( endStamp ); \
Me@178 551 addIntervalToHist( startStamp, endStamp, \
Me@178 552 _VMSMasterEnv->measHists[ SendOfTypeHistIdx ] );
Me@178 553
Me@178 554 #define Meas_startReceiveFromTo \
Me@178 555 int32 startStamp, endStamp; \
Me@178 556 saveLowTimeStampCountInto( startStamp ); \
Me@178 557
Me@178 558 #define Meas_endReceiveFromTo \
Me@178 559 saveLowTimeStampCountInto( endStamp ); \
Me@178 560 addIntervalToHist( startStamp, endStamp, \
Me@178 561 _VMSMasterEnv->measHists[ ReceiveFromToHistIdx ] );
Me@178 562
Me@178 563 #define Meas_startReceiveOfType \
Me@178 564 int32 startStamp, endStamp; \
Me@178 565 saveLowTimeStampCountInto( startStamp ); \
Me@178 566
Me@178 567 #define Meas_endReceiveOfType \
Me@178 568 saveLowTimeStampCountInto( endStamp ); \
Me@178 569 addIntervalToHist( startStamp, endStamp, \
Me@178 570 _VMSMasterEnv->measHists[ReceiveOfTypeHistIdx ] );
Me@178 571
Me@178 572 //=====
Me@178 573
Me@178 574 #include "ProcrContext.h"
Me@178 575 #include "probes.h"
Me@178 576 #include "vutilities.h"
Me@178 577
Me@178 578 #endif /* _VMS_H */
Me@178 579