Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison MasterLoop.c @ 186:69eb54ce9c4b
fix uninitialised semantic Data bug
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 31 Jan 2012 18:30:35 +0100 |
| parents | 28cc465f7eb7 |
| children | fe5ad5726e36 |
comparison
equal
deleted
inserted
replaced
| 51:8865ccd317de | 52:c30f289e28fe |
|---|---|
| 113 //Total Master time includes one coreloop time -- just assume the core | 113 //Total Master time includes one coreloop time -- just assume the core |
| 114 // loop time is same for Master as for AppVPs, even though it may be | 114 // loop time is same for Master as for AppVPs, even though it may be |
| 115 // smaller due to higher predictability of the fixed jmp. | 115 // smaller due to higher predictability of the fixed jmp. |
| 116 saveLowTimeStampCountInto( masterPr->startMasterTSCLow ); | 116 saveLowTimeStampCountInto( masterPr->startMasterTSCLow ); |
| 117 #endif | 117 #endif |
| 118 | |
| 118 //======================================================================== | 119 //======================================================================== |
| 119 | 120 |
| 120 masterEnv = (MasterEnv*)_VMSMasterEnv; | 121 masterEnv = (MasterEnv*)_VMSMasterEnv; |
| 121 | 122 |
| 122 //GCC may optimize so doesn't always re-define from frame-storage | 123 //GCC may optimize so doesn't always re-define from frame-storage |
| 127 | 128 |
| 128 requestHandler = masterEnv->requestHandler; | 129 requestHandler = masterEnv->requestHandler; |
| 129 slaveScheduler = masterEnv->slaveScheduler; | 130 slaveScheduler = masterEnv->slaveScheduler; |
| 130 semanticEnv = masterEnv->semanticEnv; | 131 semanticEnv = masterEnv->semanticEnv; |
| 131 | 132 |
| 132 #ifdef MEAS__PERF_COUNTERS | 133 #ifdef MEAS__PERF_COUNTERS |
| 133 CounterHandler counterHandler = masterEnv->counterHandler; | 134 CounterHandler counterHandler = masterEnv->counterHandler; |
| 134 #endif | 135 #endif |
| 135 | 136 |
| 136 //Poll each slot's Done flag | 137 //Poll each slot's Done flag |
| 137 numSlotsFilled = 0; | 138 numSlotsFilled = 0; |
| 138 for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++) | 139 for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++) |
| 139 { | 140 { |
| 151 saveLowTimeStampCountInto( startStamp1 ); | 152 saveLowTimeStampCountInto( startStamp1 ); |
| 152 #endif | 153 #endif |
| 153 #ifdef MEAS__PERF_COUNTERS | 154 #ifdef MEAS__PERF_COUNTERS |
| 154 uint64 cycles, instrs; | 155 uint64 cycles, instrs; |
| 155 saveCyclesAndInstrs(thisCoresIdx,cycles, instrs); | 156 saveCyclesAndInstrs(thisCoresIdx,cycles, instrs); |
| 156 (*counterHandler)(MasterLoop_beforeReqHdlr,currSlot->procrAssignedToSlot,cycles,instrs); | 157 //(*counterHandler)(MasterLoop_beforeReqHdlr,currSlot->procrAssignedToSlot,cycles,instrs); |
| 157 #endif | 158 #endif |
| 158 //============================================================ | 159 //============================================================ |
| 159 (*requestHandler)( currSlot->procrAssignedToSlot, semanticEnv ); | 160 (*requestHandler)( currSlot->procrAssignedToSlot, semanticEnv ); |
| 160 //====================== MEASUREMENT STUFF =================== | 161 //====================== MEASUREMENT STUFF =================== |
| 161 #ifdef MEAS__TIME_PLUGIN | 162 #ifdef MEAS__TIME_PLUGIN |
| 178 #ifdef MEAS__PERF_COUNTERS | 179 #ifdef MEAS__PERF_COUNTERS |
| 179 //start assigner | 180 //start assigner |
| 180 uint64 tmp_cycles; | 181 uint64 tmp_cycles; |
| 181 uint64 tmp_instrs; | 182 uint64 tmp_instrs; |
| 182 saveCyclesAndInstrs(thisCoresIdx,tmp_cycles,tmp_instrs); | 183 saveCyclesAndInstrs(thisCoresIdx,tmp_cycles,tmp_instrs); |
| 184 //FIXME WTF AM I DOING WHY DOES THIS EVEN WORK | |
| 185 //(*counterHandler)(MasterLoop_beforeNextAssign,schedVirtPr,tmp_cycles,tmp_instrs); | |
| 183 #endif | 186 #endif |
| 184 schedVirtPr = | 187 schedVirtPr = |
| 185 (*slaveScheduler)( semanticEnv, thisCoresIdx, slotIdx ); | 188 (*slaveScheduler)( semanticEnv, thisCoresIdx, slotIdx ); |
| 186 | 189 |
| 187 if( schedVirtPr != NULL ) | 190 if( schedVirtPr != NULL ) |
