Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison VMS.h @ 193:20358f56e498
fix coreloop recording bug and eliminate race condition on measurement-collecting list
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 09 Feb 2012 15:40:11 +0100 |
| parents | fe5ad5726e36 |
| children | d83f59e6e2db |
comparison
equal
deleted
inserted
replaced
| 87:7ff447b4af17 | 89:3a98456a2631 |
|---|---|
| 84 // machine | 84 // machine |
| 85 #define NUM_CORES 4 | 85 #define NUM_CORES 4 |
| 86 | 86 |
| 87 // tradeoff amortizing master fixed overhead vs imbalance potential | 87 // tradeoff amortizing master fixed overhead vs imbalance potential |
| 88 // when work-stealing, can make bigger, at risk of losing cache affinity | 88 // when work-stealing, can make bigger, at risk of losing cache affinity |
| 89 #define NUM_SCHED_SLOTS 1 | 89 #define NUM_SCHED_SLOTS 5 |
| 90 | 90 |
| 91 #define MIN_WORK_UNIT_CYCLES 20000 | 91 #define MIN_WORK_UNIT_CYCLES 20000 |
| 92 | 92 |
| 93 #define MASTERLOCK_RETRIES 10000 | 93 #define MASTERLOCK_RETRIES 10000 |
| 94 | 94 |
| 127 typedef VirtProcr * (*SlaveScheduler) ( void *, int, int ); //semEnv, coreIdx | 127 typedef VirtProcr * (*SlaveScheduler) ( void *, int, int ); //semEnv, coreIdx |
| 128 typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv | 128 typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv |
| 129 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr | 129 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr |
| 130 typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr | 130 typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr |
| 131 typedef void (*ResumePrFnPtr) ( VirtProcr *, void * ); | 131 typedef void (*ResumePrFnPtr) ( VirtProcr *, void * ); |
| 132 typedef void (*CounterHandler) (int,VirtProcr*,uint64,uint64); | 132 typedef void (*CounterHandler) (int,int,int,VirtProcr*,uint64,uint64); |
| 133 | 133 |
| 134 //============= Requests =========== | 134 //============= Requests =========== |
| 135 // | 135 // |
| 136 | 136 |
| 137 enum VMSReqstType //avoid starting enums at 0, for debug reasons | 137 enum VMSReqstType //avoid starting enums at 0, for debug reasons |
| 210 #endif | 210 #endif |
| 211 #ifdef MEAS__PERF_COUNTERS // | 211 #ifdef MEAS__PERF_COUNTERS // |
| 212 //CounterRecord** counter_history; | 212 //CounterRecord** counter_history; |
| 213 //PrivDynArrayInfo* counter_history_array_info; | 213 //PrivDynArrayInfo* counter_history_array_info; |
| 214 #endif | 214 #endif |
| 215 int isMasterVP; | |
| 216 int isShutdownVP; | |
| 215 //======================================== | 217 //======================================== |
| 216 | 218 |
| 217 float64 createPtInSecs; //have space but don't use on some configs | 219 float64 createPtInSecs; //have space but don't use on some configs |
| 218 int numTimesScheduled; //defines units together w/ procrID | 220 int numTimesScheduled; //defines units together w/ procrID |
| 219 }; | 221 }; |
| 441 instrs = 0; \ | 443 instrs = 0; \ |
| 442 } \ | 444 } \ |
| 443 } while (0) | 445 } while (0) |
| 444 | 446 |
| 445 enum eventType { | 447 enum eventType { |
| 446 MasterLoop_beforeReqHdlr = 1, | 448 DebugEvt = 0, |
| 447 MasterLoop_afterReqHdlr, | 449 AppResponderInvocation_start, |
| 448 MasterLoop_beforeAssign, | 450 AppResponder_start, |
| 449 MasterLoop_afterAssign, | 451 AppResponder_end, |
| 450 CoreLoop_afterWork, | 452 Assigner_start, |
| 451 CoreLoop_beforeWork, | 453 Assigner_end, |
| 452 Procr_suspend, | 454 Work_start, |
| 453 MasterLoop_beforeNextAssign | 455 Work_end, |
| 456 HwResponderInvocation_start | |
| 454 }; | 457 }; |
| 455 | 458 |
| 456 #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ | 459 #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ |
| 457 void* frame_ptr0 = vp_ptr->framePtr; \ | 460 void* frame_ptr0 = vp_ptr->framePtr; \ |
| 458 void* frame_ptr1 = *((void**)frame_ptr0); \ | 461 void* frame_ptr1 = *((void**)frame_ptr0); \ |
