changeset 187:fe5ad5726e36 perf_counters

counters working ...sort of
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Fri, 03 Feb 2012 17:32:48 +0100
parents 69eb54ce9c4b
children 20358f56e498
files MasterLoop.c VMS.h
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/MasterLoop.c	Tue Jan 31 18:30:35 2012 +0100
     1.2 +++ b/MasterLoop.c	Fri Feb 03 17:32:48 2012 +0100
     1.3 @@ -152,9 +152,10 @@
     1.4                 saveLowTimeStampCountInto( startStamp1 );
     1.5                 #endif
     1.6                 #ifdef MEAS__PERF_COUNTERS
     1.7 +               VirtProcr p_sav = *(currSlot->procrAssignedToSlot);
     1.8                 uint64 cycles, instrs;
     1.9                 saveCyclesAndInstrs(thisCoresIdx,cycles, instrs);
    1.10 -               //(*counterHandler)(MasterLoop_beforeReqHdlr,currSlot->procrAssignedToSlot,cycles,instrs);
    1.11 +               (*counterHandler)(MasterLoop_beforeReqHdlr,&p_sav,cycles,instrs);
    1.12                 #endif
    1.13                 //============================================================
    1.14           (*requestHandler)( currSlot->procrAssignedToSlot, semanticEnv );
    1.15 @@ -170,7 +171,7 @@
    1.16                 //done with constraints check
    1.17                 uint64 cycles2,instrs2;
    1.18                 saveCyclesAndInstrs(thisCoresIdx,cycles2, instrs2);
    1.19 -               (*counterHandler)(MasterLoop_afterReqHdlr,currSlot->procrAssignedToSlot,cycles2,instrs2);
    1.20 +               (*counterHandler)(MasterLoop_afterReqHdlr,&p_sav,cycles2,instrs2);
    1.21                 #endif
    1.22                 //============================================================
    1.23         }
     2.1 --- a/VMS.h	Tue Jan 31 18:30:35 2012 +0100
     2.2 +++ b/VMS.h	Fri Feb 03 17:32:48 2012 +0100
     2.3 @@ -42,7 +42,7 @@
     2.4  #define dbgAppFlow   FALSE /* Top level flow of application code -- general*/
     2.5  #define dbgProbes    FALSE /* for issues inside probes themselves*/
     2.6  #define dbgB2BMaster FALSE /* in coreloop, back to back master VPs*/
     2.7 -#define dbgRqstHdlr  TRUE /* in request handler code*/
     2.8 +#define dbgRqstHdlr  FALSE /* in request handler code*/
     2.9  #define dbgDependency TRUE /* in request handler code, print dependencies */
    2.10  
    2.11  //Comment or un- the substitute half to turn on/off types of debug message
    2.12 @@ -82,7 +82,7 @@
    2.13  //=========================  Hardware related Constants =====================
    2.14     //This value is the number of hardware threads in the shared memory
    2.15     // machine
    2.16 -#define NUM_CORES        2
    2.17 +#define NUM_CORES        4
    2.18  
    2.19     // tradeoff amortizing master fixed overhead vs imbalance potential
    2.20     // when work-stealing, can make bigger, at risk of losing cache affinity