# HG changeset patch # User Nina Engelhardt # Date 1332950504 -7200 # Node ID 7ed97c9619019c5edb0fb2c0f45970a0abd147ef # Parent b95711c6965ce5725273c6edbc51642fcbb050ea make idle VPs optional diff -r b95711c6965c -r 7ed97c961901 AnimationMaster.c --- a/AnimationMaster.c Wed Mar 21 11:09:11 2012 +0100 +++ b/AnimationMaster.c Wed Mar 28 18:01:44 2012 +0200 @@ -154,7 +154,7 @@ { currSlot = animSlots[ slotIdx ]; - //Check if newly-done slave in slot, which will need request handld + //Check if newly-done slave in slot, which will need request handled if( currSlot->workIsDone ) { currSlot->workIsDone = FALSE; diff -r b95711c6965c -r 7ed97c961901 CoreController.c --- a/CoreController.c Wed Mar 21 11:09:11 2012 +0100 +++ b/CoreController.c Wed Mar 28 18:01:44 2012 +0200 @@ -140,7 +140,11 @@ currSlot = animSlots[ currSlotIdx ]; if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned - { numRepetitionsWithNoWork = 0; //reset back2back master count + { if(currSlot->slaveAssignedToSlot->typeOfVP == Idle){ + numRepetitionsWithNoWork ++; + } else { + numRepetitionsWithNoWork = 0; //reset back2back master count + } currSlotIdx ++; currVP = currSlot->slaveAssignedToSlot; HOLISTIC__Record_last_work; diff -r b95711c6965c -r 7ed97c961901 Defines/VMS_defs__HW_constants.h --- a/Defines/VMS_defs__HW_constants.h Wed Mar 21 11:09:11 2012 +0100 +++ b/Defines/VMS_defs__HW_constants.h Wed Mar 28 18:01:44 2012 +0200 @@ -14,7 +14,7 @@ //========================= Hardware related Constants ===================== //This value is the number of hardware threads in the shared memory // machine -#define NUM_CORES 4 +#define NUM_CORES 40 // tradeoff amortizing master fixed overhead vs imbalance potential // when work-stealing, can make bigger, at risk of losing cache affinity @@ -31,7 +31,7 @@ #define VIRT_PROCR_STACK_SIZE 0x8000 /* 32K */ // memory for VMS_int__malloc -#define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x8000000 /* 128M */ +#define MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE 0x80000000 /* 128M */ //Frequency of TS counts -- have to do tests to verify //NOTE: turn off (in BIOS) TURBO-BOOST and SPEED-STEP else won't be const diff -r b95711c6965c -r 7ed97c961901 Defines/VMS_defs__turn_on_and_off.h --- a/Defines/VMS_defs__turn_on_and_off.h Wed Mar 21 11:09:11 2012 +0100 +++ b/Defines/VMS_defs__turn_on_and_off.h Wed Mar 28 18:01:44 2012 +0200 @@ -21,14 +21,14 @@ /*turns on the probe-instrumentation in the application -- when not * defined, the calls to the probe functions turn into comments */ -#define DEBUG__TURN_ON_DEBUG_PRINT +//#define DEBUG__TURN_ON_DEBUG_PRINT /*These defines turn types of bug messages on and off */ #define dbgAppFlow TRUE /* Top level flow of application code -- general*/ #define dbgProbes FALSE /* for issues inside probes themselves*/ #define dbgB2BMaster FALSE /* in coreloop, back to back master Slvs*/ -#define dbgRqstHdlr TRUE /* in request handler code*/ +#define dbgRqstHdlr FALSE /* in request handler code*/ //#define DEBUG__TURN_ON_ERROR_MSGS diff -r b95711c6965c -r 7ed97c961901 Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h --- a/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Wed Mar 21 11:09:11 2012 +0100 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Wed Mar 28 18:01:44 2012 +0200 @@ -292,7 +292,7 @@ #define MEAS__Print_Hists_for_System_Meas #endif - #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS +#ifdef HOLISTIC__TURN_ON_PERF_COUNTERS #define MEAS__Insert_Counter_Handler \ typedef void (*CounterHandler) (int,int,int,SlaveVP*,uint64,uint64); @@ -448,6 +448,14 @@ (*(_VMSMasterEnv->counterHandler))(HwResponderInvocation_start,animatingSlv->slaveID,animatingSlv->assignCount,animatingSlv,cycles,instrs); + #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ +void* frame_ptr0 = vp_ptr->framePtr; \ +void* frame_ptr1 = *((void**)frame_ptr0); \ +void* frame_ptr2 = *((void**)frame_ptr1); \ +void* frame_ptr3 = *((void**)frame_ptr2); \ +void* ret_addr = *((void**)frame_ptr3 + 1); \ +*res_ptr = ret_addr; \ +} while (0) #else #define MEAS__Insert_Counter_Handler @@ -461,6 +469,7 @@ #define HOLISTIC__Record_Work_start #define HOLISTIC__Record_Work_end #define HOLISTIC__Record_HwResponderInvocation_start + #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) #endif //Experiment in two-step macros -- if doesn't work, insert each separately diff -r b95711c6965c -r 7ed97c961901 VMS.h --- a/VMS.h Wed Mar 21 11:09:11 2012 +0100 +++ b/VMS.h Wed Mar 28 18:01:44 2012 +0200 @@ -111,7 +111,8 @@ enum VPtype { Slave = 1, //default Master, - Shutdown + Shutdown, + Idle }; /*This structure embodies the state of a slaveVP. It is reused for masterVP