diff VMS.h @ 211:5b419522dc7f

time stamp checks added
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Thu, 08 Mar 2012 19:02:16 +0100
parents f6d81915512c
children df00af7eb307
line diff
     1.1 --- a/VMS.h	Fri Feb 10 18:35:00 2012 +0100
     1.2 +++ b/VMS.h	Thu Mar 08 19:02:16 2012 +0100
     1.3 @@ -82,7 +82,7 @@
     1.4  //=========================  Hardware related Constants =====================
     1.5     //This value is the number of hardware threads in the shared memory
     1.6     // machine
     1.7 -#define NUM_CORES        4
     1.8 +#define NUM_CORES        80
     1.9  
    1.10     // tradeoff amortizing master fixed overhead vs imbalance potential
    1.11     // when work-stealing, can make bigger, at risk of losing cache affinity
    1.12 @@ -98,7 +98,7 @@
    1.13     // memory for VMS__malloc
    1.14  #define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x10000000 /* 256M */
    1.15  
    1.16 -#define CACHE_LINE 64
    1.17 +#define CACHE_LINE 256
    1.18  #define PAGE_SIZE 4096
    1.19  
    1.20  
    1.21 @@ -274,6 +274,7 @@
    1.22     #ifdef MEAS__PERF_COUNTERS
    1.23     int cycles_counter_fd[NUM_CORES];
    1.24     int instrs_counter_fd[NUM_CORES];
    1.25 +   uint64 start_master_lock[NUM_CORES][2];
    1.26     //FILE* counteroutput;
    1.27     //CounterRecord** counter_history;
    1.28     //PrivDynArrayInfo* counter_history_array_info;
    1.29 @@ -309,6 +310,8 @@
    1.30   {
    1.31     void           *endThdPt;
    1.32     unsigned int    coreNum;
    1.33 +   volatile int    sent_ctr;
    1.34 +   volatile uint64 ret_tsc;
    1.35   }
    1.36  ThdParams;
    1.37  
    1.38 @@ -317,8 +320,9 @@
    1.39  pthread_mutex_t suspendLock;
    1.40  pthread_cond_t  suspend_cond;
    1.41  
    1.42 -
    1.43 -
    1.44 + uint64 tsc_offset_send(ThdParams* thisCoresThdParams,uint64 initval);
    1.45 + int tsc_offset_resp(ThdParams* sendCoresThdParams,int initctr);
    1.46 +  
    1.47  //=====================  Global Vars ===================
    1.48  
    1.49  volatile MasterEnv      *_VMSMasterEnv;
    1.50 @@ -420,6 +424,8 @@
    1.51     /* clobber */ : "%eax", "%edx"         \
    1.52                  );
    1.53  
    1.54 +  __inline__ uint64_t rdtsc(void); 
    1.55 +
    1.56  //====================
    1.57  #define makeAMeasHist( idx, name, numBins, startVal, binWidth ) \
    1.58     makeHighestDynArrayIndexBeAtLeast( _VMSMasterEnv->measHistsInfo, idx ); \
    1.59 @@ -449,11 +455,15 @@
    1.60      AppResponderInvocation_start,
    1.61      AppResponder_start,
    1.62      AppResponder_end,
    1.63 +    AssignerInvocation_start,
    1.64 +    NextAssigner_start,
    1.65      Assigner_start,
    1.66      Assigner_end,
    1.67      Work_start,
    1.68      Work_end,
    1.69 -    HwResponderInvocation_start
    1.70 +    HwResponderInvocation_start,
    1.71 +    Timestamp_start,
    1.72 +    Timestamp_end
    1.73  };
    1.74  
    1.75  #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{     \