Changeset 100305 in vbox
- Timestamp:
- Jun 27, 2023 10:25:44 PM (22 months ago)
- svn:sync-xref-src-repo-rev:
- 158020
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllThreadedRecompiler.cpp
r100277 r100305 169 169 struct 170 170 { 171 /** The call sequence table. */ 172 PIEMTHRDEDCALLENTRY paCalls; 171 173 /** Number of calls in paCalls. */ 172 174 uint16_t cCalls; 173 175 /** Number of calls allocated. */ 174 176 uint16_t cAllocated; 175 /** The call sequence table. */176 PIEMTHRDEDCALLENTRY paCalls;177 177 } Thrd; 178 178 }; … … 1047 1047 pTb->cbOpcodes += pVCpu->iem.s.offOpcode; 1048 1048 Assert(pTb->cbOpcodes <= pTb->cbOpcodesAllocated); 1049 pVCpu->iem.s.cInstructions++; 1049 1050 } 1050 1051 else if (pTb->Thrd.cCalls > 0) … … 1057 1058 pTb->cbOpcodes += pVCpu->iem.s.offOpcode; 1058 1059 Assert(pTb->cbOpcodes <= pTb->cbOpcodesAllocated); 1060 pVCpu->iem.s.cInstructions++; 1059 1061 } 1060 1062 break; … … 1117 1119 /* Set the current TB so CIMPL function may get at it. */ 1118 1120 pVCpu->iem.s.pCurTbR3 = pTb; 1121 pVCpu->iem.s.cTbExec++; 1119 1122 1120 1123 /* The execution loop. */ … … 1258 1261 IEM_TRY_SETJMP(pVCpu, rcStrict) 1259 1262 { 1260 for (;;) 1263 uint32_t const cPollRate = 511; /* EM.cpp passes 4095 to IEMExecLots, so an eigth of that seems reasonable for now. */ 1264 for (uint32_t iIterations = 0; ; iIterations++) 1261 1265 { 1262 1266 /* Translate PC to physical address, we'll need this for both lookup and compilation. */ … … 1278 1282 | VMCPU_FF_TLB_FLUSH 1279 1283 | VMCPU_FF_UNHALT ); 1280 if (!fCpu) 1284 if (RT_LIKELY( ( !fCpu 1285 || ( !(fCpu & ~(VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC)) 1286 && !pVCpu->cpum.GstCtx.rflags.Bits.u1IF) ) 1287 && !VM_FF_IS_ANY_SET(pVM, VM_FF_ALL_MASK) )) 1281 1288 { 1282 /* likely */ 1289 if (RT_LIKELY( (iIterations & cPollRate) != 0 1290 || !TMTimerPollBool(pVM, pVCpu))) 1291 { 1292 1293 } 1294 else 1295 return VINF_SUCCESS; 1283 1296 } 1284 1297 else -
trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
r100224 r100305 169 169 170 170 #ifdef VBOX_WITH_IEM_RECOMPILER 171 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbExec, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 172 "Executed translation block", "/IEM/CPU%u/cTbExec", idCpu); 171 173 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbAllocs, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 172 174 "Translation block allocations", "/IEM/CPU%u/cTbAllocs", idCpu); 173 175 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbFrees, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 174 176 "Translation block frees", "/IEM/CPU%u/cTbFrees", idCpu); 175 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupHits, STAMTYPE_U64 ,STAMVISIBILITY_ALWAYS, STAMUNIT_NONE,177 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupHits, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 176 178 "Translation block lookup hits", "/IEM/CPU%u/cTbLookupHits", idCpu); 177 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupMisses, STAMTYPE_U64,STAMVISIBILITY_ALWAYS, STAMUNIT_NONE,179 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupMisses, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 178 180 "Translation block lookup misses", "/IEM/CPU%u/cTbLookupMisses", idCpu); 179 181 #endif -
trunk/src/VBox/VMM/include/IEMInternal.h
r100277 r100305 1012 1012 /** Statistics: Number of TB lookup hits (debug only). */ 1013 1013 uint64_t cTbLookupHits; 1014 /** Number of TBs executed. */ 1015 uint64_t cTbExec; 1014 1016 /** Whether to end the current TB. */ 1015 1017 bool fEndTb; 1016 1018 /** Spaced reserved for recompiler data / alignment. */ 1017 1019 bool afRecompilerStuff1[7]; 1018 /** Spaced reserved for recompiler data / alignment. */1019 uint64_t auRecompilerStuff2[1];1020 1020 /** @} */ 1021 1021
Note:
See TracChangeset
for help on using the changeset viewer.