Changeset 100803 in vbox
- Timestamp:
- Aug 4, 2023 10:04:07 PM (16 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllThrdFuncsBltIn.cpp
r100802 r100803 91 91 92 92 /** 93 * Built-in function that checks for pending interrupts that can be delivered. 93 * Built-in function that checks for pending interrupts that can be delivered or 94 * forced action flags. 94 95 * 95 96 * This triggers after the completion of an instruction, so EIP is already at … … 120 121 pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.eip, fCpu, 121 122 pVCpu->CTX_SUFF(pVM)->fGlobalForcedActions & VM_FF_ALL_MASK, pVCpu->cpum.GstCtx.rflags.Bits.u1IF)); 123 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckIrqBreaks); 122 124 return VINF_IEM_REEXEC_BREAK; 123 125 } … … 139 141 fExpectedExec, pVCpu->iem.s.fExec, fExpectedExec ^ pVCpu->iem.s.fExec)); 140 142 RT_NOREF(uParam1, uParam2); 143 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckModeBreaks); 141 144 return VINF_IEM_REEXEC_BREAK; 142 145 } … … 245 248 pVCpu->iem.s.GCPhysInstrBuf + off, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \ 246 249 RT_NOREF(a_cbInstr); \ 250 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \ 247 251 return VINF_IEM_REEXEC_BREAK; \ 248 252 } \ … … 278 282 pVCpu->iem.s.GCPhysInstrBuf + offNew, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \ 279 283 RT_NOREF(a_cbInstr); \ 284 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \ 280 285 return VINF_IEM_REEXEC_BREAK; \ 281 286 } \ … … 311 316 pVCpu->iem.s.GCPhysInstrBuf + off, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \ 312 317 RT_NOREF(a_cbInstr); \ 318 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \ 313 319 return VINF_IEM_REEXEC_BREAK; \ 314 320 } \ … … 331 337 pVCpu->cpum.GstCtx.cs.u32Limit, pVCpu->cpum.GstCtx.cs.u64Base, __LINE__)); \ 332 338 RT_NOREF(a_pTb, a_cbInstr); \ 339 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckNeedCsLimChecking); \ 333 340 return VINF_IEM_REEXEC_BREAK; \ 334 341 } \ -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdRecompiler.cpp
r100801 r100803 910 910 911 911 PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls]; 912 pCall->idxInstr = pTb->cInstructions; 912 913 pCall->offOpcode = offOpcode; 913 914 pCall->idxRange = idxRange; … … 1272 1273 pTb->Thrd.cCalls = (uint16_t)(idxCall + 1); 1273 1274 pCall->enmFunction = kIemThreadedFunc_BltIn_CheckIrq; 1275 pCall->idxInstr = pTb->cInstructions; 1274 1276 pCall->uUnused0 = 0; 1275 1277 pCall->offOpcode = 0; … … 1325 1327 PIEMTHRDEDCALLENTRY pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; 1326 1328 pCall->enmFunction = kIemThreadedFunc_BltIn_CheckIrq; 1329 pCall->idxInstr = pTb->cInstructions; 1327 1330 pCall->uUnused0 = 0; 1328 1331 pCall->offOpcode = 0; … … 1497 1500 iemThreadedLogCurInstr(pVCpu, "EX"); 1498 1501 } 1499 Log9(("%04x:%08RX64: #%d - %d %s\n", pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, 1500 pTb->Thrd.cCalls - cCallsLeft - 1, pCallEntry->enmFunction, g_apszIemThreadedFunctions[pCallEntry->enmFunction])); 1502 Log9(("%04x:%08RX64: #%d/%d - %d %s\n", pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, 1503 pTb->Thrd.cCalls - cCallsLeft - 1, pCallEntry->idxInstr, pCallEntry->enmFunction, 1504 g_apszIemThreadedFunctions[pCallEntry->enmFunction])); 1501 1505 #endif 1502 1506 VBOXSTRICTRC const rcStrict = g_apfnIemThreadedFunctions[pCallEntry->enmFunction](pVCpu, … … 1509 1513 else 1510 1514 { 1511 pVCpu->iem.s.pCurTbR3 = NULL; 1515 pVCpu->iem.s.cInstructions += pCallEntry->idxInstr; /* This may be one short, but better than zero. */ 1516 pVCpu->iem.s.pCurTbR3 = NULL; 1517 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatTbExecBreaks); 1512 1518 1513 1519 /* Some status codes are just to get us out of this loop and -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables.h
r100788 r100803 207 207 return VINF_IEM_RECOMPILE_END_TB; \ 208 208 \ 209 uint8_t const idxInstrMc2 = pTb->cInstructions; \ 209 210 do { } while (0) 210 211 #define IEM_MC2_EMIT_CALL_0(a_enmFunction) do { \ … … 213 214 PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \ 214 215 pCall->enmFunction = a_enmFunction; \ 216 pCall->idxInstr = idxInstrMc2; \ 217 pCall->uUnused0 = 0; \ 215 218 pCall->offOpcode = offOpcodeMc2; \ 216 219 pCall->cbOpcode = cbInstrMc2; \ … … 226 229 PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \ 227 230 pCall->enmFunction = a_enmFunction; \ 231 pCall->idxInstr = idxInstrMc2; \ 232 pCall->uUnused0 = 0; \ 228 233 pCall->offOpcode = offOpcodeMc2; \ 229 234 pCall->cbOpcode = cbInstrMc2; \ … … 240 245 PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \ 241 246 pCall->enmFunction = a_enmFunction; \ 247 pCall->idxInstr = idxInstrMc2; \ 248 pCall->uUnused0 = 0; \ 242 249 pCall->offOpcode = offOpcodeMc2; \ 243 250 pCall->cbOpcode = cbInstrMc2; \ … … 255 262 PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \ 256 263 pCall->enmFunction = a_enmFunction; \ 264 pCall->idxInstr = idxInstrMc2; \ 265 pCall->uUnused0 = 0; \ 257 266 pCall->offOpcode = offOpcodeMc2; \ 258 267 pCall->cbOpcode = cbInstrMc2; \ -
trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
r100695 r100803 170 170 #ifdef VBOX_WITH_IEM_RECOMPILER 171 171 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbExec, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 172 "Executed translation block", "/IEM/CPU%u/cTbExec", idCpu); 172 "Executed translation block", "/IEM/CPU%u/re/cTbExec", idCpu); 173 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbExecBreaks, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 174 "Times TB execution was interrupted/broken off", "/IEM/CPU%u/re/cTbExecBreaks", idCpu); 173 175 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbAllocs, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 174 "Translation block allocations", "/IEM/CPU%u/ cTbAllocs", idCpu);176 "Translation block allocations", "/IEM/CPU%u/re/cTbAllocs", idCpu); 175 177 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbFrees, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 176 "Translation block frees", "/IEM/CPU%u/ cTbFrees", idCpu);178 "Translation block frees", "/IEM/CPU%u/re/cTbFrees", idCpu); 177 179 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupHits, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 178 "Translation block lookup hits", "/IEM/CPU%u/ cTbLookupHits", idCpu);180 "Translation block lookup hits", "/IEM/CPU%u/re/cTbLookupHits", idCpu); 179 181 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbLookupMisses, STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 180 "Translation block lookup misses", "/IEM/CPU%u/ cTbLookupMisses", idCpu);182 "Translation block lookup misses", "/IEM/CPU%u/re/cTbLookupMisses", idCpu); 181 183 182 184 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbThreadedCalls, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS_PER_TB, 183 "Calls per threaded translation block", "/IEM/CPU%u/ ThrdCallsPerTb", idCpu);185 "Calls per threaded translation block", "/IEM/CPU%u/re/ThrdCallsPerTb", idCpu); 184 186 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbThreadedInstr, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_INSTR_PER_TB, 185 "Instruction per threaded translation block", "/IEM/CPU%u/ThrdInstrPerTb", idCpu); 187 "Instruction per threaded translation block", "/IEM/CPU%u/re/ThrdInstrPerTb", idCpu); 188 189 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatCheckIrqBreaks, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 190 "TB breaks by CheckIrq", "/IEM/CPU%u/re/CheckIrqBreaks", idCpu); 191 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatCheckModeBreaks, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 192 "TB breaks by CheckMode", "/IEM/CPU%u/re/CheckModeBreaks", idCpu); 193 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatCheckBranchMisses, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 194 "Branch target misses", "/IEM/CPU%u/re/CheckTbJmpMisses", idCpu); 195 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatCheckNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 196 "Needing CS.LIM checking TB after branch or on page crossing", "/IEM/CPU%u/re/CheckTbNeedCsLimChecking", idCpu); 186 197 #endif 187 198 -
trunk/src/VBox/VMM/include/IEMInternal.h
r100801 r100803 734 734 /** The function to call (IEMTHREADEDFUNCS). */ 735 735 uint16_t enmFunction; 736 uint16_t uUnused0; 736 /** Instruction number in the TB (for statistics). */ 737 uint8_t idxInstr; 738 uint8_t uUnused0; 737 739 738 740 /** Offset into IEMTB::pabOpcodes. */ … … 1196 1198 uint64_t GCVirtTbBranchSrcBuf; 1197 1199 /* Alignment. */ 1198 uint64_t au64RecompilerStuff2[5]; 1200 /** Statistics: Times TB execution was broken off before reaching the end. */ 1201 STAMCOUNTER StatTbExecBreaks; 1202 /** Statistics: Times BltIn_CheckIrq breaks out of the TB. */ 1203 STAMCOUNTER StatCheckIrqBreaks; 1204 /** Statistics: Times BltIn_CheckMode breaks out of the TB. */ 1205 STAMCOUNTER StatCheckModeBreaks; 1206 /** Statistics: Times a post jump target check missed and had to find new TB. */ 1207 STAMCOUNTER StatCheckBranchMisses; 1208 /** Statistics: Times a jump or page crossing required a TB with CS.LIM checking. */ 1209 STAMCOUNTER StatCheckNeedCsLimChecking; 1199 1210 /** Threaded TB statistics: Number of instructions per TB. */ 1200 1211 STAMPROFILE StatTbThreadedInstr;
Note:
See TracChangeset
for help on using the changeset viewer.