# HG changeset patch # User Nina Engelhardt # Date 1331832523 -3600 # Node ID ce95c4d84fcd1ed9a9926fe0a244f5ae689ce15a # Parent 51b8f15fea297996a436636aee739105c8df355e integrating holistic model in common ancestor - not finished yet diff -r 51b8f15fea29 -r ce95c4d84fcd SSR.c --- a/SSR.c Wed Mar 14 23:22:00 2012 -0700 +++ b/SSR.c Thu Mar 15 18:28:43 2012 +0100 @@ -199,6 +199,7 @@ #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS SSR__init_counter_data_structs(); #endif + semanticEnv->shutdownInitiated = FALSE; for(i=0;iidlePr[i][j] = VMS_int__create_slaveVP(&idle_fn,NULL); diff -r 51b8f15fea29 -r ce95c4d84fcd SSR.h --- a/SSR.h Wed Mar 14 23:22:00 2012 -0700 +++ b/SSR.h Thu Mar 15 18:28:43 2012 +0100 @@ -127,6 +127,7 @@ ListOfArrays* counterList[NUM_CORES]; #endif SlaveVP* idlePr[NUM_CORES][NUM_SCHED_SLOTS]; + int shutdownInitiated; } SSRSemEnv; diff -r 51b8f15fea29 -r ce95c4d84fcd SSR_Counter_Recording.c --- a/SSR_Counter_Recording.c Wed Mar 14 23:22:00 2012 -0700 +++ b/SSR_Counter_Recording.c Thu Mar 15 18:28:43 2012 +0100 @@ -31,7 +31,7 @@ void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs) { - if (pr->isMasterVP || pr->isShutdownVP) { //Save only values for actual work + if (pr->type == Master || pr->type == Shutdown) { //Save only values for actual work return; } diff -r 51b8f15fea29 -r ce95c4d84fcd SSR_PluginFns.c --- a/SSR_PluginFns.c Wed Mar 14 23:22:00 2012 -0700 +++ b/SSR_PluginFns.c Thu Mar 15 18:28:43 2012 +0100 @@ -45,8 +45,12 @@ schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); //Note, using a non-blocking queue -- it returns NULL if queue empty - if(!schedPr){ - schedPr = semEnv->idlePr[coreNum][slotNum]; + if(!schedPr){ + schedPr = semEnv->idlePr[coreNum][slotNum]; + + if(semEnv->shutdownInitiated) { + schedPr = VMS_SS__create_shutdown_slave(); + } //things that would normally happen in resume(), but these VPs never go there #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC schedPr->numTimesAssigned++; //Somewhere here! @@ -187,7 +191,8 @@ semEnv->numSlaveVP -= 1; if( semEnv->numSlaveVP == 0 ) { //no more work, so shutdown - VMS_SS__shutdown(); + semEnv->shutdownInitiated = TRUE; + //VMS_SS__shutdown(); } }