diff VMS.h @ 235:ecbf6992dab4

debugging -- made master lock padding arch indep -- changed schedSlot to animSlot
author Some Random Person <seanhalle@yahoo.com>
date Fri, 16 Mar 2012 23:40:55 -0700
parents 0ee1a3c8972d
children ce1f57e10fac
line diff
     1.1 --- a/VMS.h	Fri Mar 16 10:43:15 2012 -0700
     1.2 +++ b/VMS.h	Fri Mar 16 23:40:55 2012 -0700
     1.3 @@ -31,14 +31,14 @@
     1.4  //
     1.5  typedef unsigned long long    TSCount;
     1.6  
     1.7 -typedef struct _SchedSlot     SchedSlot;
     1.8 +typedef struct _AnimSlot     AnimSlot;
     1.9  typedef struct _VMSReqst      VMSReqst;
    1.10  typedef struct _SlaveVP       SlaveVP;
    1.11  typedef struct _MasterVP      MasterVP;
    1.12  typedef struct _IntervalProbe IntervalProbe;
    1.13  
    1.14  
    1.15 -typedef SlaveVP *(*SlaveAssigner)  ( void *, SchedSlot*); //semEnv, slot for HW info
    1.16 +typedef SlaveVP *(*SlaveAssigner)  ( void *, AnimSlot*); //semEnv, slot for HW info
    1.17  typedef void     (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv
    1.18  typedef void     (*TopLevelFnPtr)  ( void *, SlaveVP * ); //initData, animSlv
    1.19  typedef void       TopLevelFn      ( void *, SlaveVP * ); //initData, animSlv
    1.20 @@ -96,7 +96,7 @@
    1.21   }
    1.22  SlotPerfInfo;
    1.23  
    1.24 -struct _SchedSlot
    1.25 +struct _AnimSlot
    1.26   {
    1.27     int           workIsDone;
    1.28     int           needsSlaveAssigned;
    1.29 @@ -106,7 +106,7 @@
    1.30     int           coreOfSlot;
    1.31     SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core
    1.32   };
    1.33 -//SchedSlot
    1.34 +//AnimSlot
    1.35  
    1.36   enum VPtype {
    1.37       Slave = 1, //default
    1.38 @@ -126,26 +126,27 @@
    1.39     void       *coreCtlrStackPtr; //restore before jmp back to core controller
    1.40     
    1.41        //============ below this, no fields are used in asm =============
    1.42 -   int         slaveID;          //each slave given a globally unique ID
    1.43 -   int         coreAnimatedBy;
    1.44 +   
    1.45 +   int         slaveID;       //each slave given a globally unique ID
    1.46 +   int         coreAnimatedBy; 
    1.47     void       *startOfStack;  //used to free, and to point slave to Fn
    1.48 +   enum VPtype typeOfVP;      //Slave vs Master vs Shutdown..
    1.49 +   int         assignCount;   //Each assign is for one work-unit, so IDs it
    1.50 +      //note, a scheduling decision is uniquely identified by the triple:
    1.51 +      // <slaveID, coreAnimatedBy, assignCount> -- used in record & replay
    1.52     
    1.53        //for comm -- between master and coreCtlr & btwn wrapper lib and plugin
    1.54 -   SchedSlot  *schedSlotAssignedTo;
    1.55 +   AnimSlot   *animSlotAssignedTo;
    1.56     VMSReqst   *requests;      //wrapper lib puts in requests, plugin takes out
    1.57     void       *dataRetFromReq;//Return vals from plugin to Wrapper Lib
    1.58  
    1.59 -      //Slave used as carrier for data
    1.60 +      //For using Slave as carrier for data
    1.61     void       *semanticData;  //Lang saves lang-specific things in slave here
    1.62  
    1.63 -      //=========== MEASUREMENT STUFF ==========
    1.64 -       MEAS__Insert_Meas_Fields_into_Slave;
    1.65 -      //========================================
    1.66 -   
    1.67 -   enum VPtype type;
    1.68 -   int         numTimesAssigned;
    1.69 -       
    1.70 -   float64     createPtInSecs;  //have space but don't use on some configs
    1.71 +        //=========== MEASUREMENT STUFF ==========
    1.72 +         MEAS__Insert_Meas_Fields_into_Slave;
    1.73 +         float64     createPtInSecs;  //time VP created, in seconds
    1.74 +        //========================================
    1.75   };
    1.76  //SlaveVP
    1.77  
    1.78 @@ -155,13 +156,14 @@
    1.79  typedef struct
    1.80   {    //The offsets of these fields are hard-coded into assembly
    1.81     void            *coreCtlrReturnPt;    //offset of field used in asm
    1.82 -   int32            masterLock __align_to_cacheline__;   //used in asm
    1.83 -   
    1.84 +   int8             falseSharePad1[256 - sizeof(void*)];
    1.85 +   int32            masterLock;          //offset of field used in asm
    1.86 +   int8             falseSharePad2[256 - sizeof(int32)];
    1.87        //============ below this, no fields are used in asm =============
    1.88  
    1.89        //Basic VMS infrastructure
    1.90     SlaveVP        **masterVPs;
    1.91 -   SchedSlot     ***allSchedSlots;
    1.92 +   AnimSlot      ***allAnimSlots;
    1.93     
    1.94        //plugin related
    1.95     SlaveAssigner    slaveAssigner;