Changeset 104361 in vbox
- Timestamp:
- Apr 18, 2024 2:34:59 PM (10 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r104343 r104361 135 135 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseDe,(PVMCPUCC pVCpu)) 136 136 { 137 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseDe); 137 138 iemRaiseDivideErrorJmp(pVCpu); 138 139 #ifndef _MSC_VER … … 147 148 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseUd,(PVMCPUCC pVCpu)) 148 149 { 150 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseUd); 149 151 iemRaiseUndefinedOpcodeJmp(pVCpu); 150 152 #ifndef _MSC_VER … … 161 163 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseSseRelated,(PVMCPUCC pVCpu)) 162 164 { 165 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseSseRelated); 163 166 if ( (pVCpu->cpum.GstCtx.cr0 & X86_CR0_EM) 164 167 || !(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSFXSR)) … … 179 182 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseAvxRelated,(PVMCPUCC pVCpu)) 180 183 { 184 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseAvxRelated); 181 185 if ( (pVCpu->cpum.GstCtx.aXcr[0] & (XSAVE_C_YMM | XSAVE_C_SSE)) != (XSAVE_C_YMM | XSAVE_C_SSE) 182 186 || !(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE)) … … 197 201 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseSseAvxFpRelated,(PVMCPUCC pVCpu)) 198 202 { 203 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseSseAvxFpRelated); 199 204 if (pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXMMEEXCPT) 200 205 iemRaiseSimdFpExceptionJmp(pVCpu); … … 212 217 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseNm,(PVMCPUCC pVCpu)) 213 218 { 219 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseNm); 214 220 iemRaiseDeviceNotAvailableJmp(pVCpu); 215 221 #ifndef _MSC_VER … … 224 230 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseGp0,(PVMCPUCC pVCpu)) 225 231 { 232 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseGp0); 226 233 iemRaiseGeneralProtectionFault0Jmp(pVCpu); 227 234 #ifndef _MSC_VER … … 236 243 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseMf,(PVMCPUCC pVCpu)) 237 244 { 245 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseMf); 238 246 iemRaiseMathFaultJmp(pVCpu); 239 247 #ifndef _MSC_VER … … 248 256 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseXf,(PVMCPUCC pVCpu)) 249 257 { 258 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseXf); 250 259 iemRaiseSimdFpExceptionJmp(pVCpu); 251 260 #ifndef _MSC_VER … … 266 275 that return path codes via the native code generated for the TB. */ 267 276 Log7(("TB obsolete: %p at %04x:%08RX64\n", pVCpu->iem.s.pCurTbR3, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip)); 277 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitObsoleteTb); 268 278 iemThreadedTbObsolete(pVCpu, pVCpu->iem.s.pCurTbR3, false /*fSafeToFree*/); 269 279 return VINF_IEM_REEXEC_BREAK; … … 6173 6183 6174 6184 #ifdef VBOX_WITH_STATISTICS 6185 6175 6186 /** 6176 6187 * Emits code to update the thread call statistics. … … 6211 6222 return off; 6212 6223 } 6224 6213 6225 #endif /* VBOX_WITH_STATISTICS */ 6214 6215 6226 6216 6227 /** … … 9276 9287 { 9277 9288 IEMNATIVELABELTYPE enmLabel; 9278 uint32_t offVCpuStats;9279 9289 PFNIEMNATIVESIMPLETAILLABELCALL pfnCallback; 9280 9290 } const g_aSimpleTailLabels[] = 9281 9291 { 9282 { kIemNativeLabelType_Invalid, 0,NULL },9283 { kIemNativeLabelType_RaiseDe, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseDe),iemNativeHlpExecRaiseDe },9284 { kIemNativeLabelType_RaiseUd, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseUd),iemNativeHlpExecRaiseUd },9285 { kIemNativeLabelType_RaiseSseRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseRelated),iemNativeHlpExecRaiseSseRelated },9286 { kIemNativeLabelType_RaiseAvxRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseAvxRelated),iemNativeHlpExecRaiseAvxRelated },9287 { kIemNativeLabelType_RaiseSseAvxFpRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseAvxFpRelated),iemNativeHlpExecRaiseSseAvxFpRelated },9288 { kIemNativeLabelType_RaiseNm, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseNm),iemNativeHlpExecRaiseNm },9289 { kIemNativeLabelType_RaiseGp0, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseGp0),iemNativeHlpExecRaiseGp0 },9290 { kIemNativeLabelType_RaiseMf, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseMf),iemNativeHlpExecRaiseMf },9291 { kIemNativeLabelType_RaiseXf, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseXf),iemNativeHlpExecRaiseXf },9292 { kIemNativeLabelType_ObsoleteTb, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitObsoleteTb),iemNativeHlpObsoleteTb },9293 { kIemNativeLabelType_NeedCsLimChecking, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitNeedCsLimChecking),iemNativeHlpNeedCsLimChecking },9294 { kIemNativeLabelType_CheckBranchMiss, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitCheckBranchMiss),iemNativeHlpCheckBranchMiss },9292 { kIemNativeLabelType_Invalid, NULL }, 9293 { kIemNativeLabelType_RaiseDe, iemNativeHlpExecRaiseDe }, 9294 { kIemNativeLabelType_RaiseUd, iemNativeHlpExecRaiseUd }, 9295 { kIemNativeLabelType_RaiseSseRelated, iemNativeHlpExecRaiseSseRelated }, 9296 { kIemNativeLabelType_RaiseAvxRelated, iemNativeHlpExecRaiseAvxRelated }, 9297 { kIemNativeLabelType_RaiseSseAvxFpRelated, iemNativeHlpExecRaiseSseAvxFpRelated }, 9298 { kIemNativeLabelType_RaiseNm, iemNativeHlpExecRaiseNm }, 9299 { kIemNativeLabelType_RaiseGp0, iemNativeHlpExecRaiseGp0 }, 9300 { kIemNativeLabelType_RaiseMf, iemNativeHlpExecRaiseMf }, 9301 { kIemNativeLabelType_RaiseXf, iemNativeHlpExecRaiseXf }, 9302 { kIemNativeLabelType_ObsoleteTb, iemNativeHlpObsoleteTb }, 9303 { kIemNativeLabelType_NeedCsLimChecking, iemNativeHlpNeedCsLimChecking }, 9304 { kIemNativeLabelType_CheckBranchMiss, iemNativeHlpCheckBranchMiss }, 9295 9305 }; 9306 9296 9307 AssertCompile(RT_ELEMENTS(g_aSimpleTailLabels) == (unsigned)kIemNativeLabelType_LastSimple + 1U); 9297 9308 AssertCompile(kIemNativeLabelType_Invalid == 0); … … 9310 9321 { 9311 9322 iemNativeLabelDefine(pReNative, idxLabel, off); 9312 9313 #ifdef VBOX_WITH_STATISTICS9314 off = iemNativeEmitNativeTbExitStats(pReNative, off, g_aSimpleTailLabels[enmLabel].offVCpuStats);9315 #endif9316 9323 9317 9324 /* int pfnCallback(PVMCPUCC pVCpu) */ -
trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
r104357 r104361 569 569 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativePcUpdateDelayed, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Delayed RIP updates", "/IEM/CPU%u/re/NativePcUpdateDelayed", idCpu); 570 570 571 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR571 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 572 572 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeSimdRegFindFree, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 573 573 "Number of calls to iemNativeSimdRegAllocFindFree.", … … 603 603 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeMaybeAvxXcptCheckOmitted, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT() checks omitted", 604 604 "/IEM/CPU%u/re/NativeMaybeAvxXcptCheckOmitted", idCpu); 605 # endif605 # endif 606 606 607 607 /* Ratio of the status bit skippables. */ … … 618 618 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnWithFlags, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 619 619 "Number of times the TB finished through the ReturnWithFlags label", "/IEM/CPU%u/re/NativeTbExitReturnWithFlags", idCpu); 620 # endif /* VBOX_WITH_STATISTICS */ 620 621 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitObsoleteTb, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 621 622 "Number of times the TB finished through the ObsoleteTb label", "/IEM/CPU%u/re/NativeTbExitObsoleteTb", idCpu); 622 STAMR3RegisterF(pVM, &pVCpu->iem.s.Stat NativeTbExitNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,623 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 623 624 "Number of times the TB finished through the NeedCsLimChecking label", "/IEM/CPU%u/re/NativeTbExitNeedCsLimChecking", idCpu); 624 STAMR3RegisterF(pVM, &pVCpu->iem.s.Stat NativeTbExitCheckBranchMiss, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,625 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckBranchMisses, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 625 626 "Number of times the TB finished through the CheckBranchMiss label", "/IEM/CPU%u/re/NativeTbExitCheckBranchMiss", idCpu); 626 627 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseDe, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, … … 643 644 "Number of times the TB finished raising a #XF exception", "/IEM/CPU%u/re/NativeTbExitRaiseXf", idCpu); 644 645 645 # endif /* VBOX_WITH_STATISTICS */646 646 # endif /* VBOX_WITH_IEM_NATIVE_RECOMPILER */ 647 647 -
trunk/src/VBox/VMM/include/IEMInternal.h
r104357 r104361 2047 2047 /** Native recompiler: The TB finished executing jumping to the ReturnWithFlags label. */ 2048 2048 STAMCOUNTER StatNativeTbExitReturnWithFlags; 2049 2049 2050 /** Native recompiler: The TB finished executing jumping to the RaiseDe label. */ 2050 2051 STAMCOUNTER StatNativeTbExitRaiseDe; … … 2067 2068 /** Native recompiler: The TB finished executing jumping to the ObsoleteTb label. */ 2068 2069 STAMCOUNTER StatNativeTbExitObsoleteTb; 2069 /** Native recompiler: The TB finished executing jumping to the NeedCsLimChecking label. */ 2070 STAMCOUNTER StatNativeTbExitNeedCsLimChecking; 2071 /** Native recompiler: The TB finished executing jumping to the CheckBranchMiss label. */ 2072 STAMCOUNTER StatNativeTbExitCheckBranchMiss; 2073 2074 uint64_t au64Padding[3]; 2070 2071 uint64_t au64Padding[5]; 2075 2072 /** @} */ 2076 2073
Note:
See TracChangeset
for help on using the changeset viewer.