Changeset 104281 in vbox
- Timestamp:
- Apr 10, 2024 5:21:10 PM (10 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r104211 r104281 3683 3683 3684 3684 #ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 3685 # if def LOG_ENABLED3685 # if defined(LOG_ENABLED) || defined(IEMNATIVE_WITH_TB_DEBUG_INFO) 3686 3686 /** Host CPU SIMD register names. */ 3687 3687 DECL_HIDDEN_CONST(const char * const) g_apszIemNativeHstSimdRegNames[] = … … 6209 6209 iemNativeLabelDefine(pReNative, idxLabel, off); 6210 6210 6211 #ifdef VBOX_WITH_STATISTICS 6212 uint8_t const idxStatsTmp1 = iemNativeRegAllocTmp(pReNative, &off); 6213 uint8_t const idxStatsTmp2 = iemNativeRegAllocTmp(pReNative, &off); 6214 off = iemNativeEmitIncStamCounterInVCpu(pReNative, off, idxStatsTmp1, idxStatsTmp2, 6215 RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitReturnWithFlags)); 6216 iemNativeRegFreeTmp(pReNative, idxStatsTmp1); 6217 iemNativeRegFreeTmp(pReNative, idxStatsTmp2); 6218 #endif 6219 6211 6220 off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_CALL_RET_GREG, VINF_IEM_REEXEC_FINISH_WITH_FLAGS); 6212 6221 … … 6227 6236 { 6228 6237 iemNativeLabelDefine(pReNative, idxLabel, off); 6238 6239 #ifdef VBOX_WITH_STATISTICS 6240 uint8_t const idxStatsTmp1 = iemNativeRegAllocTmp(pReNative, &off); 6241 uint8_t const idxStatsTmp2 = iemNativeRegAllocTmp(pReNative, &off); 6242 off = iemNativeEmitIncStamCounterInVCpu(pReNative, off, idxStatsTmp1, idxStatsTmp2, 6243 RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitReturnBreak)); 6244 iemNativeRegFreeTmp(pReNative, idxStatsTmp1); 6245 iemNativeRegFreeTmp(pReNative, idxStatsTmp2); 6246 #endif 6229 6247 6230 6248 off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_CALL_RET_GREG, VINF_IEM_REEXEC_BREAK); … … 9214 9232 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeFullyRecompiledTbs); 9215 9233 9234 #ifdef VBOX_WITH_STATISTICS 9235 uint8_t const idxStatsTmp1 = iemNativeRegAllocTmp(pReNative, &off); 9236 uint8_t const idxStatsTmp2 = iemNativeRegAllocTmp(pReNative, &off); 9237 off = iemNativeEmitIncStamCounterInVCpu(pReNative, off, idxStatsTmp1, idxStatsTmp2, 9238 RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbFinished)); 9239 iemNativeRegFreeTmp(pReNative, idxStatsTmp1); 9240 iemNativeRegFreeTmp(pReNative, idxStatsTmp2); 9241 #endif 9242 9216 9243 /* 9217 9244 * Emit the epilog code. … … 9239 9266 { 9240 9267 IEMNATIVELABELTYPE enmLabel; 9268 uint32_t offVCpuStats; 9241 9269 PFNIEMNATIVESIMPLETAILLABELCALL pfnCallback; 9242 9270 } const g_aSimpleTailLabels[] = 9243 9271 { 9244 { kIemNativeLabelType_Invalid, NULL },9245 { kIemNativeLabelType_RaiseDe, iemNativeHlpExecRaiseDe },9246 { kIemNativeLabelType_RaiseUd, iemNativeHlpExecRaiseUd },9247 { kIemNativeLabelType_RaiseSseRelated, iemNativeHlpExecRaiseSseRelated },9248 { kIemNativeLabelType_RaiseAvxRelated, iemNativeHlpExecRaiseAvxRelated },9249 { kIemNativeLabelType_RaiseSseAvxFpRelated, iemNativeHlpExecRaiseSseAvxFpRelated },9250 { kIemNativeLabelType_RaiseNm, iemNativeHlpExecRaiseNm },9251 { kIemNativeLabelType_RaiseGp0, iemNativeHlpExecRaiseGp0 },9252 { kIemNativeLabelType_RaiseMf, iemNativeHlpExecRaiseMf },9253 { kIemNativeLabelType_RaiseXf, iemNativeHlpExecRaiseXf },9254 { kIemNativeLabelType_ObsoleteTb, iemNativeHlpObsoleteTb },9255 { kIemNativeLabelType_NeedCsLimChecking, iemNativeHlpNeedCsLimChecking },9256 { kIemNativeLabelType_CheckBranchMiss, iemNativeHlpCheckBranchMiss },9272 { kIemNativeLabelType_Invalid, 0, NULL }, 9273 { kIemNativeLabelType_RaiseDe, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseDe), iemNativeHlpExecRaiseDe }, 9274 { kIemNativeLabelType_RaiseUd, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseUd), iemNativeHlpExecRaiseUd }, 9275 { kIemNativeLabelType_RaiseSseRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseRelated), iemNativeHlpExecRaiseSseRelated }, 9276 { kIemNativeLabelType_RaiseAvxRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseAvxRelated), iemNativeHlpExecRaiseAvxRelated }, 9277 { kIemNativeLabelType_RaiseSseAvxFpRelated, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseAvxFpRelated), iemNativeHlpExecRaiseSseAvxFpRelated }, 9278 { kIemNativeLabelType_RaiseNm, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseNm), iemNativeHlpExecRaiseNm }, 9279 { kIemNativeLabelType_RaiseGp0, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseGp0), iemNativeHlpExecRaiseGp0 }, 9280 { kIemNativeLabelType_RaiseMf, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseMf), iemNativeHlpExecRaiseMf }, 9281 { kIemNativeLabelType_RaiseXf, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseXf), iemNativeHlpExecRaiseXf }, 9282 { kIemNativeLabelType_ObsoleteTb, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitObsoleteTb), iemNativeHlpObsoleteTb }, 9283 { kIemNativeLabelType_NeedCsLimChecking, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitNeedCsLimChecking), iemNativeHlpNeedCsLimChecking }, 9284 { kIemNativeLabelType_CheckBranchMiss, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitCheckBranchMiss), iemNativeHlpCheckBranchMiss }, 9257 9285 }; 9258 9286 AssertCompile(RT_ELEMENTS(g_aSimpleTailLabels) == (unsigned)kIemNativeLabelType_LastSimple + 1U); … … 9261 9289 if (fTailLabels) 9262 9290 { 9291 #ifdef VBOX_WITH_STATISTICS 9292 uint8_t const idxStatsTmp1 = iemNativeRegAllocTmp(pReNative, &off); 9293 uint8_t const idxStatsTmp2 = iemNativeRegAllocTmp(pReNative, &off); 9294 #endif 9295 9263 9296 do 9264 9297 { … … 9273 9306 iemNativeLabelDefine(pReNative, idxLabel, off); 9274 9307 9308 #ifdef VBOX_WITH_STATISTICS 9309 off = iemNativeEmitIncStamCounterInVCpu(pReNative, off, idxStatsTmp1, idxStatsTmp2, 9310 g_aSimpleTailLabels[enmLabel].offVCpuStats); 9311 #endif 9312 9275 9313 /* int pfnCallback(PVMCPUCC pVCpu) */ 9276 9314 off = iemNativeEmitLoadGprFromGpr(pReNative, off, IEMNATIVE_CALL_ARG0_GREG, IEMNATIVE_REG_FIXED_PVMCPU); … … 9282 9320 9283 9321 } while (fTailLabels); 9322 9323 #ifdef VBOX_WITH_STATISTICS 9324 iemNativeRegFreeTmp(pReNative, idxStatsTmp1); 9325 iemNativeRegFreeTmp(pReNative, idxStatsTmp2); 9326 #endif 9284 9327 } 9285 9328 } -
trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
r104271 r104281 601 601 "Delayed RIP updating percentage", 602 602 "/IEM/CPU%u/re/NativePcUpdateDelayed_StatusDelayedPct", idCpu); 603 604 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbFinished, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 605 "Number of times the TB finishes execution completely", "/IEM/CPU%u/re/NativeTbFinished", idCpu); 606 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnBreak, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 607 "Number of times the TB finished through the ReturnBreak label", "/IEM/CPU%u/re/NativeTbExitReturnBreak", idCpu); 608 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnWithFlags, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 609 "Number of times the TB finished through the ReturnWithFlags label", "/IEM/CPU%u/re/NativeTbExitReturnWithFlags", idCpu); 610 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitObsoleteTb, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 611 "Number of times the TB finished through the ObsoleteTb label", "/IEM/CPU%u/re/NativeTbExitObsoleteTb", idCpu); 612 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 613 "Number of times the TB finished through the NeedCsLimChecking label", "/IEM/CPU%u/re/NativeTbExitNeedCsLimChecking", idCpu); 614 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitCheckBranchMiss, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 615 "Number of times the TB finished through the CheckBranchMiss label", "/IEM/CPU%u/re/NativeTbExitCheckBranchMiss", idCpu); 616 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseDe, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 617 "Number of times the TB finished raising a #DE exception", "/IEM/CPU%u/re/NativeTbExitRaiseDe", idCpu); 618 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseUd, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 619 "Number of times the TB finished raising a #UD exception", "/IEM/CPU%u/re/NativeTbExitRaiseUd", idCpu); 620 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseSseRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 621 "Number of times the TB finished raising a SSE related exception", "/IEM/CPU%u/re/NativeTbExitRaiseSseRelated", idCpu); 622 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseAvxRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 623 "Number of times the TB finished raising a AVX related exception", "/IEM/CPU%u/re/NativeTbExitRaiseAvxRelated", idCpu); 624 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseSseAvxFpRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 625 "Number of times the TB finished raising a SSE/AVX floating point related exception", "/IEM/CPU%u/re/NativeTbExitRaiseSseAvxFpRelated", idCpu); 626 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseNm, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 627 "Number of times the TB finished raising a #NM exception", "/IEM/CPU%u/re/NativeTbExitRaiseNm", idCpu); 628 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseGp0, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 629 "Number of times the TB finished raising a #GP(0) exception", "/IEM/CPU%u/re/NativeTbExitRaiseGp0", idCpu); 630 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseMf, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 631 "Number of times the TB finished raising a #MF exception", "/IEM/CPU%u/re/NativeTbExitRaiseMf", idCpu); 632 STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseXf, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 633 "Number of times the TB finished raising a #XF exception", "/IEM/CPU%u/re/NativeTbExitRaiseXf", idCpu); 603 634 604 635 # endif /* VBOX_WITH_STATISTICS */ -
trunk/src/VBox/VMM/include/IEMInternal.h
r104274 r104281 1988 1988 #endif 1989 1989 1990 uint64_t au64Padding[2]; 1990 /** Native recompiler: The TB finished executing completely without jumping to a an exit label. */ 1991 STAMCOUNTER StatNativeTbFinished; 1992 /** Native recompiler: The TB finished executing jumping to the ReturnBreak label. */ 1993 STAMCOUNTER StatNativeTbExitReturnBreak; 1994 /** Native recompiler: The TB finished executing jumping to the ReturnWithFlags label. */ 1995 STAMCOUNTER StatNativeTbExitReturnWithFlags; 1996 /** Native recompiler: The TB finished executing jumping to the RaiseDe label. */ 1997 STAMCOUNTER StatNativeTbExitRaiseDe; 1998 /** Native recompiler: The TB finished executing jumping to the RaiseUd label. */ 1999 STAMCOUNTER StatNativeTbExitRaiseUd; 2000 /** Native recompiler: The TB finished executing jumping to the RaiseSseRelated label. */ 2001 STAMCOUNTER StatNativeTbExitRaiseSseRelated; 2002 /** Native recompiler: The TB finished executing jumping to the RaiseAvxRelated label. */ 2003 STAMCOUNTER StatNativeTbExitRaiseAvxRelated; 2004 /** Native recompiler: The TB finished executing jumping to the RaiseSseAvxFpRelated label. */ 2005 STAMCOUNTER StatNativeTbExitRaiseSseAvxFpRelated; 2006 /** Native recompiler: The TB finished executing jumping to the RaiseNm label. */ 2007 STAMCOUNTER StatNativeTbExitRaiseNm; 2008 /** Native recompiler: The TB finished executing jumping to the RaiseGp0 label. */ 2009 STAMCOUNTER StatNativeTbExitRaiseGp0; 2010 /** Native recompiler: The TB finished executing jumping to the RaiseMf label. */ 2011 STAMCOUNTER StatNativeTbExitRaiseMf; 2012 /** Native recompiler: The TB finished executing jumping to the RaiseXf label. */ 2013 STAMCOUNTER StatNativeTbExitRaiseXf; 2014 /** Native recompiler: The TB finished executing jumping to the ObsoleteTb label. */ 2015 STAMCOUNTER StatNativeTbExitObsoleteTb; 2016 /** Native recompiler: The TB finished executing jumping to the NeedCsLimChecking label. */ 2017 STAMCOUNTER StatNativeTbExitNeedCsLimChecking; 2018 /** Native recompiler: The TB finished executing jumping to the CheckBranchMiss label. */ 2019 STAMCOUNTER StatNativeTbExitCheckBranchMiss; 2020 2021 uint64_t au64Padding[3]; 1991 2022 /** @} */ 1992 2023
Note:
See TracChangeset
for help on using the changeset viewer.