diff MasterLoop.c @ 48:054006c26b92

Added instrumentation to measure master time, master lock time and create time
author Me
date Tue, 26 Oct 2010 18:18:30 -0700
parents e3b78148e9de
children 984f7d78bfdf
line diff
     1.1 --- a/MasterLoop.c	Sat Oct 16 04:11:15 2010 -0700
     1.2 +++ b/MasterLoop.c	Tue Oct 26 18:18:30 2010 -0700
     1.3 @@ -100,10 +100,11 @@
     1.4     masterLoopStartPt:
     1.5     //============================= MEASUREMENT STUFF ========================
     1.6     #ifdef MEAS__TIME_MASTER
     1.7 +   int startStamp, endStamp;
     1.8        //Total Master time includes one coreloop time -- just assume the core
     1.9        // loop time is same for Master as for AppVPs, even though it will be
    1.10        // smaller due to high predictability of the fixed jmp.
    1.11 -   saveLowTimeStampCountInto( masterPr->startMasterTSCLow );
    1.12 +   saveLowTimeStampCountInto( startStamp );
    1.13     #endif
    1.14     //========================================================================
    1.15  
    1.16 @@ -164,9 +165,12 @@
    1.17     coreLoopFramePtr  = masterPr->coreLoopFramePtr;//need this only
    1.18     coreLoopStackPtr  = masterPr->coreLoopStackPtr;//shouldn't need -- safety
    1.19     
    1.20 +   //============================= MEASUREMENT STUFF ========================
    1.21     #ifdef MEAS__TIME_MASTER
    1.22 -   saveLowTimeStampCountInto( masterPr->endMasterTSCLow );
    1.23 +   saveLowTimeStampCountInto( endStamp );
    1.24 +   addIntervalToHist(startStamp,endStamp,_VMSMasterEnv->stats->masterTimeHist);
    1.25     #endif
    1.26 +   //========================================================================
    1.27  
    1.28     asm volatile("movl %0,     %%eax;  \
    1.29                   movl %%esp, (%%eax); \