Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison VMS.h @ 45:5388f1c2da6f
added MIN_WORK_UNIT_CYCLES and updated comments
| author | Me |
|---|---|
| date | Thu, 14 Oct 2010 17:07:23 -0700 |
| parents | 6c9f314daf24 |
| children | 72373405c816 8f7141a9272e |
comparison
equal
deleted
inserted
replaced
| 15:f608f259d44a | 16:e6c9287eeb6c |
|---|---|
| 13 #include "VMS_primitive_data_types.h" | 13 #include "VMS_primitive_data_types.h" |
| 14 #include "Queue_impl/BlockingQueue.h" | 14 #include "Queue_impl/BlockingQueue.h" |
| 15 #include "Histogram/Histogram.h" | 15 #include "Histogram/Histogram.h" |
| 16 #include <pthread.h> | 16 #include <pthread.h> |
| 17 | 17 |
| 18 //When DEBUG is defined, VMS does sequential exe in the main thread | 18 //When SEQUENTIAL is defined, VMS does sequential exe in the main thread |
| 19 // It still does co-routines and all the mechanisms are the same, it just | 19 // It still does co-routines and all the mechanisms are the same, it just |
| 20 // has only a single thread and animates VPs one at a time | 20 // has only a single thread and animates VPs one at a time |
| 21 #define SEQUENTIAL | 21 //#define SEQUENTIAL |
| 22 | 22 |
| 23 //when MEAS__TAKE_SUSP_TSC is defined, causes code to be inserted and | 23 #define PRINT_DEBUG(msg) //printf(msg); fflush(stdin); |
| 24 #define PRINT1_DEBUG(msg, param) //printf(msg, param); fflush(stdin); | |
| 25 #define PRINT2_DEBUG(msg, p1, p2) //printf(msg, p1, p2); fflush(stdin); | |
| 26 | |
| 27 //when MEAS__TIME_STAMP_SUSP is defined, causes code to be inserted and | |
| 24 // compiled-in that saves the low part of the time stamp count just before | 28 // compiled-in that saves the low part of the time stamp count just before |
| 25 // suspending a processor and just after resuming that processor. It is | 29 // suspending a processor and just after resuming that processor. It is |
| 26 // saved into a field added to VirtProcr. Have to sanity-check for | 30 // saved into a field added to VirtProcr. Have to sanity-check for |
| 27 // rollover of low portion into high portion. | 31 // rollover of low portion into high portion. |
| 28 #define MEAS__TIME_STAMP_SUSP | 32 #define MEAS__TIME_STAMP_SUSP |
| 29 #define MEAS__TIME_MASTER | 33 #define MEAS__TIME_MASTER |
| 30 #define MEAS__NUM_TIMES_TO_RUN 100000 | 34 #define MEAS__NUM_TIMES_TO_RUN 100000 |
| 31 | 35 |
| 36 #define NUM_TSC_ROUND_TRIPS 10 | |
| 37 | |
| 32 //This value is the number of hardware threads in the shared memory | 38 //This value is the number of hardware threads in the shared memory |
| 33 // machine | 39 // machine |
| 34 #define NUM_CORES 4 | 40 #define NUM_CORES 4 |
| 35 | 41 |
| 36 // make double-num-cores scheduling slots, plus extra for master | 42 // balance amortizing master fixed overhead vs imbalance potential |
| 37 //#define NUM_SCHED_SLOTS (2 * NUM_CORES + 1) | |
| 38 #define NUM_SCHED_SLOTS 3 | 43 #define NUM_SCHED_SLOTS 3 |
| 44 | |
| 45 #define MIN_WORK_UNIT_CYCLES 20000 | |
| 39 | 46 |
| 40 #define READYTOANIMATE_RETRIES 10000 | 47 #define READYTOANIMATE_RETRIES 10000 |
| 41 | 48 |
| 42 // stack | 49 // stack |
| 43 #define VIRT_PROCR_STACK_SIZE 0x10000 | 50 #define VIRT_PROCR_STACK_SIZE 0x10000 |
