changeset 239:7ed97c961901 Common_Ancestor

make idle VPs optional
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Wed, 28 Mar 2012 18:01:44 +0200
parents b95711c6965c
children 1cfcf49dc7ab
files AnimationMaster.c CoreController.c Defines/VMS_defs__HW_constants.h Defines/VMS_defs__turn_on_and_off.h Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h VMS.h
diffstat 6 files changed, 22 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/AnimationMaster.c	Wed Mar 21 11:09:11 2012 +0100
     1.2 +++ b/AnimationMaster.c	Wed Mar 28 18:01:44 2012 +0200
     1.3 @@ -154,7 +154,7 @@
     1.4      {
     1.5        currSlot = animSlots[ slotIdx ];
     1.6  
     1.7 -         //Check if newly-done slave in slot, which will need request handld
     1.8 +         //Check if newly-done slave in slot, which will need request handled
     1.9        if( currSlot->workIsDone )
    1.10         {
    1.11           currSlot->workIsDone         = FALSE;
     2.1 --- a/CoreController.c	Wed Mar 21 11:09:11 2012 +0100
     2.2 +++ b/CoreController.c	Wed Mar 28 18:01:44 2012 +0200
     2.3 @@ -140,7 +140,11 @@
     2.4        currSlot = animSlots[ currSlotIdx ];
     2.5  
     2.6        if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned
     2.7 -       { numRepetitionsWithNoWork = 0;     //reset back2back master count
     2.8 +      { if(currSlot->slaveAssignedToSlot->typeOfVP == Idle){
     2.9 +          numRepetitionsWithNoWork ++;
    2.10 +        } else {
    2.11 +          numRepetitionsWithNoWork = 0;     //reset back2back master count
    2.12 +        }
    2.13           currSlotIdx ++;
    2.14           currVP = currSlot->slaveAssignedToSlot;
    2.15           HOLISTIC__Record_last_work;
     3.1 --- a/Defines/VMS_defs__HW_constants.h	Wed Mar 21 11:09:11 2012 +0100
     3.2 +++ b/Defines/VMS_defs__HW_constants.h	Wed Mar 28 18:01:44 2012 +0200
     3.3 @@ -14,7 +14,7 @@
     3.4  //=========================  Hardware related Constants =====================
     3.5     //This value is the number of hardware threads in the shared memory
     3.6     // machine
     3.7 -#define NUM_CORES        4
     3.8 +#define NUM_CORES        40
     3.9  
    3.10     // tradeoff amortizing master fixed overhead vs imbalance potential
    3.11     // when work-stealing, can make bigger, at risk of losing cache affinity
    3.12 @@ -31,7 +31,7 @@
    3.13  #define VIRT_PROCR_STACK_SIZE 0x8000 /* 32K */
    3.14  
    3.15     // memory for VMS_int__malloc
    3.16 -#define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x8000000 /* 128M */
    3.17 +#define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x80000000 /* 128M */
    3.18  
    3.19     //Frequency of TS counts -- have to do tests to verify
    3.20     //NOTE: turn off (in BIOS)  TURBO-BOOST and SPEED-STEP else won't be const
     4.1 --- a/Defines/VMS_defs__turn_on_and_off.h	Wed Mar 21 11:09:11 2012 +0100
     4.2 +++ b/Defines/VMS_defs__turn_on_and_off.h	Wed Mar 28 18:01:44 2012 +0200
     4.3 @@ -21,14 +21,14 @@
     4.4  /*turns on the probe-instrumentation in the application -- when not
     4.5   * defined, the calls to the probe functions turn into comments
     4.6   */
     4.7 -#define DEBUG__TURN_ON_DEBUG_PRINT
     4.8 +//#define DEBUG__TURN_ON_DEBUG_PRINT
     4.9  
    4.10  /*These defines turn types of bug messages on and off
    4.11   */
    4.12  #define dbgAppFlow   TRUE /* Top level flow of application code -- general*/
    4.13  #define dbgProbes    FALSE /* for issues inside probes themselves*/
    4.14  #define dbgB2BMaster FALSE /* in coreloop, back to back master Slvs*/
    4.15 -#define dbgRqstHdlr  TRUE /* in request handler code*/
    4.16 +#define dbgRqstHdlr  FALSE /* in request handler code*/
    4.17  
    4.18  //#define DEBUG__TURN_ON_ERROR_MSGS
    4.19  
     5.1 --- a/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h	Wed Mar 21 11:09:11 2012 +0100
     5.2 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h	Wed Mar 28 18:01:44 2012 +0200
     5.3 @@ -292,7 +292,7 @@
     5.4     #define MEAS__Print_Hists_for_System_Meas 
     5.5  #endif
     5.6  
     5.7 - #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS
     5.8 +#ifdef HOLISTIC__TURN_ON_PERF_COUNTERS
     5.9     
    5.10  #define MEAS__Insert_Counter_Handler \
    5.11     typedef void (*CounterHandler) (int,int,int,SlaveVP*,uint64,uint64);
    5.12 @@ -448,6 +448,14 @@
    5.13          (*(_VMSMasterEnv->counterHandler))(HwResponderInvocation_start,animatingSlv->slaveID,animatingSlv->assignCount,animatingSlv,cycles,instrs); 
    5.14          
    5.15  
    5.16 +   #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{     \
    5.17 +void* frame_ptr0 = vp_ptr->framePtr;                               \
    5.18 +void* frame_ptr1 = *((void**)frame_ptr0);                          \
    5.19 +void* frame_ptr2 = *((void**)frame_ptr1);                          \
    5.20 +void* frame_ptr3 = *((void**)frame_ptr2);                          \
    5.21 +void* ret_addr = *((void**)frame_ptr3 + 1);                        \
    5.22 +*res_ptr = ret_addr;                                               \
    5.23 +} while (0)
    5.24  
    5.25  #else  
    5.26     #define MEAS__Insert_Counter_Handler
    5.27 @@ -461,6 +469,7 @@
    5.28     #define HOLISTIC__Record_Work_start
    5.29     #define HOLISTIC__Record_Work_end
    5.30     #define HOLISTIC__Record_HwResponderInvocation_start
    5.31 +   #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr)
    5.32  #endif
    5.33  
    5.34  //Experiment in two-step macros -- if doesn't work, insert each separately
     6.1 --- a/VMS.h	Wed Mar 21 11:09:11 2012 +0100
     6.2 +++ b/VMS.h	Wed Mar 28 18:01:44 2012 +0200
     6.3 @@ -111,7 +111,8 @@
     6.4   enum VPtype {
     6.5       Slave = 1, //default
     6.6       Master,
     6.7 -     Shutdown
     6.8 +     Shutdown,
     6.9 +     Idle
    6.10   };
    6.11   
    6.12  /*This structure embodies the state of a slaveVP.  It is reused for masterVP