Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
changeset 66:ce95c4d84fcd Holistic_Model
integrating holistic model in common ancestor - not finished yet
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 15 Mar 2012 18:28:43 +0100 |
| parents | 51b8f15fea29 |
| children | 81a0f076b12e |
| files | SSR.c SSR.h SSR_Counter_Recording.c SSR_PluginFns.c |
| diffstat | 4 files changed, 11 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/SSR.c Wed Mar 14 23:22:00 2012 -0700 1.2 +++ b/SSR.c Thu Mar 15 18:28:43 2012 +0100 1.3 @@ -199,6 +199,7 @@ 1.4 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 1.5 SSR__init_counter_data_structs(); 1.6 #endif 1.7 + semanticEnv->shutdownInitiated = FALSE; 1.8 for(i=0;i<NUM_CORES;++i){ 1.9 for(j=0;j<NUM_SCHED_SLOTS;++j){ 1.10 semanticEnv->idlePr[i][j] = VMS_int__create_slaveVP(&idle_fn,NULL);
2.1 --- a/SSR.h Wed Mar 14 23:22:00 2012 -0700 2.2 +++ b/SSR.h Thu Mar 15 18:28:43 2012 +0100 2.3 @@ -127,6 +127,7 @@ 2.4 ListOfArrays* counterList[NUM_CORES]; 2.5 #endif 2.6 SlaveVP* idlePr[NUM_CORES][NUM_SCHED_SLOTS]; 2.7 + int shutdownInitiated; 2.8 } 2.9 SSRSemEnv; 2.10
3.1 --- a/SSR_Counter_Recording.c Wed Mar 14 23:22:00 2012 -0700 3.2 +++ b/SSR_Counter_Recording.c Thu Mar 15 18:28:43 2012 +0100 3.3 @@ -31,7 +31,7 @@ 3.4 void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs) 3.5 { 3.6 3.7 - if (pr->isMasterVP || pr->isShutdownVP) { //Save only values for actual work 3.8 + if (pr->type == Master || pr->type == Shutdown) { //Save only values for actual work 3.9 return; 3.10 } 3.11
4.1 --- a/SSR_PluginFns.c Wed Mar 14 23:22:00 2012 -0700 4.2 +++ b/SSR_PluginFns.c Thu Mar 15 18:28:43 2012 +0100 4.3 @@ -45,8 +45,12 @@ 4.4 4.5 schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); 4.6 //Note, using a non-blocking queue -- it returns NULL if queue empty 4.7 - if(!schedPr){ 4.8 - schedPr = semEnv->idlePr[coreNum][slotNum]; 4.9 + if(!schedPr){ 4.10 + schedPr = semEnv->idlePr[coreNum][slotNum]; 4.11 + 4.12 + if(semEnv->shutdownInitiated) { 4.13 + schedPr = VMS_SS__create_shutdown_slave(); 4.14 + } 4.15 //things that would normally happen in resume(), but these VPs never go there 4.16 #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 4.17 schedPr->numTimesAssigned++; //Somewhere here! 4.18 @@ -187,7 +191,8 @@ 4.19 semEnv->numSlaveVP -= 1; 4.20 if( semEnv->numSlaveVP == 0 ) 4.21 { //no more work, so shutdown 4.22 - VMS_SS__shutdown(); 4.23 + semEnv->shutdownInitiated = TRUE; 4.24 + //VMS_SS__shutdown(); 4.25 } 4.26 } 4.27
