# HG changeset patch # User Nina Engelhardt # Date 1328031035 -3600 # Node ID 69eb54ce9c4bdd90fa673bc0ded914733dedb529 # Parent 28cc465f7eb7e25df7229fb236ab9177a34197df fix uninitialised semantic Data bug diff -r 28cc465f7eb7 -r 69eb54ce9c4b MasterLoop.c --- a/MasterLoop.c Fri Jan 13 18:34:31 2012 +0100 +++ b/MasterLoop.c Tue Jan 31 18:30:35 2012 +0100 @@ -115,6 +115,7 @@ // smaller due to higher predictability of the fixed jmp. saveLowTimeStampCountInto( masterPr->startMasterTSCLow ); #endif + //======================================================================== masterEnv = (MasterEnv*)_VMSMasterEnv; @@ -129,9 +130,9 @@ slaveScheduler = masterEnv->slaveScheduler; semanticEnv = masterEnv->semanticEnv; -#ifdef MEAS__PERF_COUNTERS - CounterHandler counterHandler = masterEnv->counterHandler; -#endif + #ifdef MEAS__PERF_COUNTERS + CounterHandler counterHandler = masterEnv->counterHandler; + #endif //Poll each slot's Done flag numSlotsFilled = 0; @@ -153,7 +154,7 @@ #ifdef MEAS__PERF_COUNTERS uint64 cycles, instrs; saveCyclesAndInstrs(thisCoresIdx,cycles, instrs); - (*counterHandler)(MasterLoop_beforeReqHdlr,currSlot->procrAssignedToSlot,cycles,instrs); + //(*counterHandler)(MasterLoop_beforeReqHdlr,currSlot->procrAssignedToSlot,cycles,instrs); #endif //============================================================ (*requestHandler)( currSlot->procrAssignedToSlot, semanticEnv ); @@ -180,6 +181,8 @@ uint64 tmp_cycles; uint64 tmp_instrs; saveCyclesAndInstrs(thisCoresIdx,tmp_cycles,tmp_instrs); + //FIXME WTF AM I DOING WHY DOES THIS EVEN WORK + //(*counterHandler)(MasterLoop_beforeNextAssign,schedVirtPr,tmp_cycles,tmp_instrs); #endif schedVirtPr = (*slaveScheduler)( semanticEnv, thisCoresIdx, slotIdx ); diff -r 28cc465f7eb7 -r 69eb54ce9c4b VMS.c --- a/VMS.c Fri Jan 13 18:34:31 2012 +0100 +++ b/VMS.c Tue Jan 31 18:30:35 2012 +0100 @@ -436,6 +436,12 @@ //record time stamp: compare to time-stamp recorded below saveLowTimeStampCountInto( animatingPr->preSuspTSCLow ); #endif + #ifdef MEAS__PERF_COUNTERS + //start work + uint64 cycles,instrs; + saveCyclesAndInstrs(animatingPr->coreAnimatedBy,cycles, instrs); + (*(_VMSMasterEnv->counterHandler))(Procr_suspend,animatingPr,cycles,instrs); + #endif //======================================================================= switchToCoreLoop(animatingPr); diff -r 28cc465f7eb7 -r 69eb54ce9c4b VMS.h --- a/VMS.h Fri Jan 13 18:34:31 2012 +0100 +++ b/VMS.h Tue Jan 31 18:30:35 2012 +0100 @@ -42,7 +42,7 @@ #define dbgAppFlow FALSE /* Top level flow of application code -- general*/ #define dbgProbes FALSE /* for issues inside probes themselves*/ #define dbgB2BMaster FALSE /* in coreloop, back to back master VPs*/ -#define dbgRqstHdlr FALSE /* in request handler code*/ +#define dbgRqstHdlr TRUE /* in request handler code*/ #define dbgDependency TRUE /* in request handler code, print dependencies */ //Comment or un- the substitute half to turn on/off types of debug message @@ -86,7 +86,7 @@ // tradeoff amortizing master fixed overhead vs imbalance potential // when work-stealing, can make bigger, at risk of losing cache affinity -#define NUM_SCHED_SLOTS 5 +#define NUM_SCHED_SLOTS 1 #define MIN_WORK_UNIT_CYCLES 20000 @@ -448,7 +448,9 @@ MasterLoop_beforeAssign, MasterLoop_afterAssign, CoreLoop_afterWork, - CoreLoop_beforeWork + CoreLoop_beforeWork, + Procr_suspend, + MasterLoop_beforeNextAssign }; #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \