Index: /trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp	(revision 104360)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp	(revision 104361)
@@ -135,4 +135,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseDe,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseDe);
     iemRaiseDivideErrorJmp(pVCpu);
 #ifndef _MSC_VER
@@ -147,4 +148,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseUd,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseUd);
     iemRaiseUndefinedOpcodeJmp(pVCpu);
 #ifndef _MSC_VER
@@ -161,4 +163,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseSseRelated,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseSseRelated);
     if (   (pVCpu->cpum.GstCtx.cr0 & X86_CR0_EM)
         || !(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSFXSR))
@@ -179,4 +182,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseAvxRelated,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseAvxRelated);
     if (   (pVCpu->cpum.GstCtx.aXcr[0] & (XSAVE_C_YMM | XSAVE_C_SSE)) != (XSAVE_C_YMM | XSAVE_C_SSE)
         || !(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
@@ -197,4 +201,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseSseAvxFpRelated,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseSseAvxFpRelated);
     if (pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXMMEEXCPT)
         iemRaiseSimdFpExceptionJmp(pVCpu);
@@ -212,4 +217,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseNm,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseNm);
     iemRaiseDeviceNotAvailableJmp(pVCpu);
 #ifndef _MSC_VER
@@ -224,4 +230,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseGp0,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseGp0);
     iemRaiseGeneralProtectionFault0Jmp(pVCpu);
 #ifndef _MSC_VER
@@ -236,4 +243,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseMf,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseMf);
     iemRaiseMathFaultJmp(pVCpu);
 #ifndef _MSC_VER
@@ -248,4 +256,5 @@
 IEM_DECL_NATIVE_HLP_DEF(int, iemNativeHlpExecRaiseXf,(PVMCPUCC pVCpu))
 {
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitRaiseXf);
     iemRaiseSimdFpExceptionJmp(pVCpu);
 #ifndef _MSC_VER
@@ -266,4 +275,5 @@
        that return path codes via the native code generated for the TB. */
     Log7(("TB obsolete: %p at %04x:%08RX64\n", pVCpu->iem.s.pCurTbR3, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip));
+    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitObsoleteTb);
     iemThreadedTbObsolete(pVCpu, pVCpu->iem.s.pCurTbR3, false /*fSafeToFree*/);
     return VINF_IEM_REEXEC_BREAK;
@@ -6173,4 +6183,5 @@
 
 #ifdef VBOX_WITH_STATISTICS
+
 /**
  * Emits code to update the thread call statistics.
@@ -6211,6 +6222,6 @@
     return off;
 }
+
 #endif /* VBOX_WITH_STATISTICS */
-
 
 /**
@@ -9276,22 +9287,22 @@
         {
             IEMNATIVELABELTYPE              enmLabel;
-            uint32_t                        offVCpuStats;
             PFNIEMNATIVESIMPLETAILLABELCALL pfnCallback;
         } const g_aSimpleTailLabels[] =
         {
-            {   kIemNativeLabelType_Invalid,                0, NULL },
-            {   kIemNativeLabelType_RaiseDe,                RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseDe),               iemNativeHlpExecRaiseDe },
-            {   kIemNativeLabelType_RaiseUd,                RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseUd),               iemNativeHlpExecRaiseUd },
-            {   kIemNativeLabelType_RaiseSseRelated,        RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseRelated),       iemNativeHlpExecRaiseSseRelated },
-            {   kIemNativeLabelType_RaiseAvxRelated,        RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseAvxRelated),       iemNativeHlpExecRaiseAvxRelated },
-            {   kIemNativeLabelType_RaiseSseAvxFpRelated,   RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseSseAvxFpRelated),  iemNativeHlpExecRaiseSseAvxFpRelated },
-            {   kIemNativeLabelType_RaiseNm,                RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseNm),               iemNativeHlpExecRaiseNm },
-            {   kIemNativeLabelType_RaiseGp0,               RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseGp0),              iemNativeHlpExecRaiseGp0 },
-            {   kIemNativeLabelType_RaiseMf,                RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseMf),               iemNativeHlpExecRaiseMf },
-            {   kIemNativeLabelType_RaiseXf,                RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitRaiseXf),               iemNativeHlpExecRaiseXf },
-            {   kIemNativeLabelType_ObsoleteTb,             RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitObsoleteTb),            iemNativeHlpObsoleteTb },
-            {   kIemNativeLabelType_NeedCsLimChecking,      RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitNeedCsLimChecking),     iemNativeHlpNeedCsLimChecking },
-            {   kIemNativeLabelType_CheckBranchMiss,        RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitCheckBranchMiss),       iemNativeHlpCheckBranchMiss },
+            {   kIemNativeLabelType_Invalid,                NULL },
+            {   kIemNativeLabelType_RaiseDe,                iemNativeHlpExecRaiseDe },
+            {   kIemNativeLabelType_RaiseUd,                iemNativeHlpExecRaiseUd },
+            {   kIemNativeLabelType_RaiseSseRelated,        iemNativeHlpExecRaiseSseRelated },
+            {   kIemNativeLabelType_RaiseAvxRelated,        iemNativeHlpExecRaiseAvxRelated },
+            {   kIemNativeLabelType_RaiseSseAvxFpRelated,   iemNativeHlpExecRaiseSseAvxFpRelated },
+            {   kIemNativeLabelType_RaiseNm,                iemNativeHlpExecRaiseNm },
+            {   kIemNativeLabelType_RaiseGp0,               iemNativeHlpExecRaiseGp0 },
+            {   kIemNativeLabelType_RaiseMf,                iemNativeHlpExecRaiseMf },
+            {   kIemNativeLabelType_RaiseXf,                iemNativeHlpExecRaiseXf },
+            {   kIemNativeLabelType_ObsoleteTb,             iemNativeHlpObsoleteTb },
+            {   kIemNativeLabelType_NeedCsLimChecking,      iemNativeHlpNeedCsLimChecking },
+            {   kIemNativeLabelType_CheckBranchMiss,        iemNativeHlpCheckBranchMiss },
         };
+
         AssertCompile(RT_ELEMENTS(g_aSimpleTailLabels) == (unsigned)kIemNativeLabelType_LastSimple + 1U);
         AssertCompile(kIemNativeLabelType_Invalid == 0);
@@ -9310,8 +9321,4 @@
                 {
                     iemNativeLabelDefine(pReNative, idxLabel, off);
-
-#ifdef VBOX_WITH_STATISTICS
-                    off = iemNativeEmitNativeTbExitStats(pReNative, off, g_aSimpleTailLabels[enmLabel].offVCpuStats);
-#endif
 
                     /* int pfnCallback(PVMCPUCC pVCpu) */
Index: /trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/IEMR3.cpp	(revision 104360)
+++ /trunk/src/VBox/VMM/VMMR3/IEMR3.cpp	(revision 104361)
@@ -569,5 +569,5 @@
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativePcUpdateDelayed, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Delayed RIP updates", "/IEM/CPU%u/re/NativePcUpdateDelayed", idCpu);
 
-#ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR
+#   ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeSimdRegFindFree, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
                         "Number of calls to iemNativeSimdRegAllocFindFree.",
@@ -603,5 +603,5 @@
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeMaybeAvxXcptCheckOmitted,              STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT() checks omitted",
                         "/IEM/CPU%u/re/NativeMaybeAvxXcptCheckOmitted", idCpu);
-#endif
+#   endif
 
         /* Ratio of the status bit skippables. */
@@ -618,9 +618,10 @@
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnWithFlags, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
                         "Number of times the TB finished through the ReturnWithFlags label", "/IEM/CPU%u/re/NativeTbExitReturnWithFlags", idCpu);
+#  endif /* VBOX_WITH_STATISTICS */
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitObsoleteTb, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
                         "Number of times the TB finished through the ObsoleteTb label", "/IEM/CPU%u/re/NativeTbExitObsoleteTb", idCpu);
-        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
                         "Number of times the TB finished through the NeedCsLimChecking label", "/IEM/CPU%u/re/NativeTbExitNeedCsLimChecking", idCpu);
-        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitCheckBranchMiss, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckBranchMisses, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
                         "Number of times the TB finished through the CheckBranchMiss label", "/IEM/CPU%u/re/NativeTbExitCheckBranchMiss", idCpu);
         STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseDe, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
@@ -643,5 +644,4 @@
                         "Number of times the TB finished raising a #XF exception", "/IEM/CPU%u/re/NativeTbExitRaiseXf", idCpu);
 
-#  endif /* VBOX_WITH_STATISTICS */
 # endif /* VBOX_WITH_IEM_NATIVE_RECOMPILER */
 
Index: /trunk/src/VBox/VMM/include/IEMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/IEMInternal.h	(revision 104360)
+++ /trunk/src/VBox/VMM/include/IEMInternal.h	(revision 104361)
@@ -2047,4 +2047,5 @@
     /** Native recompiler: The TB finished executing jumping to the ReturnWithFlags label. */
     STAMCOUNTER             StatNativeTbExitReturnWithFlags;
+
     /** Native recompiler: The TB finished executing jumping to the RaiseDe label. */
     STAMCOUNTER             StatNativeTbExitRaiseDe;
@@ -2067,10 +2068,6 @@
     /** Native recompiler: The TB finished executing jumping to the ObsoleteTb label. */
     STAMCOUNTER             StatNativeTbExitObsoleteTb;
-    /** Native recompiler: The TB finished executing jumping to the NeedCsLimChecking label. */
-    STAMCOUNTER             StatNativeTbExitNeedCsLimChecking;
-    /** Native recompiler: The TB finished executing jumping to the CheckBranchMiss label. */
-    STAMCOUNTER             StatNativeTbExitCheckBranchMiss;
-
-    uint64_t                au64Padding[3];
+
+    uint64_t                au64Padding[5];
     /** @} */
 
