comparison MasterLoop.c @ 41:cf3e9238aeb0

Measure suspend and master times works -- refactored
author Me
date Sat, 11 Sep 2010 04:40:12 -0700
parents 17d20e5cf924
children e3b78148e9de
comparison
equal deleted inserted replaced
10:3c434c85ba8c 11:b25a7dccbd21
100 masterLoopStartPt: 100 masterLoopStartPt:
101 //============================= MEASUREMENT STUFF ======================== 101 //============================= MEASUREMENT STUFF ========================
102 #ifdef MEAS__TIME_MASTER 102 #ifdef MEAS__TIME_MASTER
103 //Total Master time includes one coreloop time -- just assume the core 103 //Total Master time includes one coreloop time -- just assume the core
104 // loop time is same for Master as for AppVPs, even though it will be 104 // loop time is same for Master as for AppVPs, even though it will be
105 // smaller due to high predictability of the jumps. 105 // smaller due to high predictability of the fixed jmp.
106 saveLowTimeStampCountInto( masterPr->startMasterTSCLow ); 106 saveLowTimeStampCountInto( masterPr->startMasterTSCLow );
107 #endif 107 #endif
108 //======================================================================== 108 //========================================================================
109 109
110 masterEnv = _VMSMasterEnv; 110 masterEnv = _VMSMasterEnv;
164 coreLoopFramePtr = masterPr->coreLoopFramePtr;//need this only 164 coreLoopFramePtr = masterPr->coreLoopFramePtr;//need this only
165 coreLoopStackPtr = masterPr->coreLoopStackPtr;//shouldn't need -- safety 165 coreLoopStackPtr = masterPr->coreLoopStackPtr;//shouldn't need -- safety
166 166
167 #ifdef MEAS__TIME_MASTER 167 #ifdef MEAS__TIME_MASTER
168 saveLowTimeStampCountInto( masterPr->endMasterTSCLow ); 168 saveLowTimeStampCountInto( masterPr->endMasterTSCLow );
169 int diff = masterPr->endMasterTSCLow - masterPr->startMasterTSCLow;
170 if( diff > 1000000 ) diff = 0;
171 addToHist( diff, masterEnv->measMasterHist );
172 #endif 169 #endif
173 170
174 asm volatile("movl %0, %%eax; \ 171 asm volatile("movl %0, %%eax; \
175 movl %%esp, (%%eax); \ 172 movl %%esp, (%%eax); \
176 movl %1, %%eax; \ 173 movl %1, %%eax; \