changeset 47:23bcca1c3687 perf_counters

added units to plugin ucc recording
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 20 Dec 2011 14:42:56 +0100
parents bde026832af7
children 593fe0543a22
files SSR.h SSR_PluginFns.c SSR_lib.c dependency.c dependency.h
diffstat 5 files changed, 14 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/SSR.h	Mon Dec 19 17:15:10 2011 +0100
     1.2 +++ b/SSR.h	Tue Dec 20 14:42:56 2011 +0100
     1.3 @@ -106,8 +106,7 @@
     1.4     SSRTrans         transactionStrucs[NUM_STRUCS_IN_SEM_ENV];
     1.5     
     1.6     #ifdef OBSERVE_UCC
     1.7 -   Unit*** unitcollection;
     1.8 -   PrivDynArrayInfo* unitcollectionInfo;
     1.9 +   ListOfArrays* unitList;
    1.10     ListOfArrays* ctlDependenciesList;
    1.11     ListOfArrays* commDependenciesList;
    1.12     //NtoN structure?
     2.1 --- a/SSR_PluginFns.c	Mon Dec 19 17:15:10 2011 +0100
     2.2 +++ b/SSR_PluginFns.c	Tue Dec 20 14:42:56 2011 +0100
     2.3 @@ -191,7 +191,7 @@
     2.4      }
     2.5     #endif
     2.6     //========================================================================
     2.7 -   
     2.8 +
     2.9     return newPr;
    2.10   }
    2.11  
    2.12 @@ -236,6 +236,10 @@
    2.13     saveLowTimeStampCountInto(lastRecord->unblocked_timestamp);
    2.14     #endif
    2.15     #ifdef OBSERVE_UCC
    2.16 +   Unit newu;
    2.17 +   newu.vp = procr->procrID;
    2.18 +   newu.task = procr->numTimesScheduled + 1;
    2.19 +   addToListOfArrays(Unit,newu,semEnv->unitList);
    2.20     Dependency newd;
    2.21     newd.from_vp = procr->procrID;
    2.22     newd.from_task = procr->numTimesScheduled;
     3.1 --- a/SSR_lib.c	Mon Dec 19 17:15:10 2011 +0100
     3.2 +++ b/SSR_lib.c	Tue Dec 20 14:42:56 2011 +0100
     3.3 @@ -211,6 +211,7 @@
     3.4     
     3.5     #ifdef OBSERVE_UCC
     3.6     //TODO: set up unit recording structure
     3.7 +   semanticEnv->unitList = makeListOfArrays(sizeof(Unit),128);
     3.8     semanticEnv->ctlDependenciesList = makeListOfArrays(sizeof(Dependency),128);
     3.9     semanticEnv->commDependenciesList = makeListOfArrays(sizeof(Dependency),128);
    3.10     //TODO: set up N:N recording structure
    3.11 @@ -280,6 +281,7 @@
    3.12          //set_dot_file(output);
    3.13          //FIXME:  first line still depends on counters being enabled, replace w/ unit struct!
    3.14          //forAllInDynArrayDo(_VMSMasterEnv->counter_history_array_info, &print_dot_node_info );
    3.15 +        forAllInListOfArraysDo(semanticEnv->unitList, &print_unit_to_file);
    3.16          forAllInListOfArraysDo( semanticEnv->commDependenciesList, &print_comm_dependency_to_file );
    3.17          forAllInListOfArraysDo( semanticEnv->ctlDependenciesList, &print_ctl_dependency_to_file );
    3.18          //fprintf(output,"}\n");
     4.1 --- a/dependency.c	Mon Dec 19 17:15:10 2011 +0100
     4.2 +++ b/dependency.c	Tue Dec 20 14:42:56 2011 +0100
     4.3 @@ -30,3 +30,8 @@
     4.4      Dependency* dep = (Dependency*) _dep;
     4.5      fprintf(dependency_file,"VP_%d_%d -> VP_%d_%d;\n",dep->from_vp,dep->from_task,dep->to_vp,dep->to_task);
     4.6  }
     4.7 +
     4.8 +void print_unit_to_file(void* _unit){
     4.9 +    Unit* unit = (Unit*) _unit;
    4.10 +    fprintf(dependency_file,"unit,%d,%d\n",unit->vp,unit->task);
    4.11 +}
    4.12 \ No newline at end of file
     5.1 --- a/dependency.h	Mon Dec 19 17:15:10 2011 +0100
     5.2 +++ b/dependency.h	Tue Dec 20 14:42:56 2011 +0100
     5.3 @@ -35,5 +35,6 @@
     5.4  
     5.5  void print_dependency_to_file(void* dep);
     5.6  
     5.7 +void print_unit_to_file(void* unit);
     5.8  #endif	/* DEPENDENCY_H */
     5.9