Index: /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp	(revision 82379)
+++ /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp	(revision 82380)
@@ -652,5 +652,4 @@
                                                    RTGCPHYS GCPhysFault, CTX_SUFF(PIOMMMIOENTRY) pRegEntry)
 {
-    STAM_PROFILE_START(&pVM->iom.s.StatRZMMIOHandler, a);
     Log(("iomMmioCommonPfHandler: GCPhysFault=%RGp uErr=%#x rip=%RGv\n", GCPhysFault, uErrorCode, CPUMGetGuestRIP(pVCpu) ));
     RT_NOREF(GCPhysFault, uErrorCode);
@@ -693,9 +692,7 @@
             }
 #ifndef IN_RING3
-            STAM_PROFILE_STOP(&pVM->iom.s.StatRZMMIOHandler, a);
             return rcStrict;
         }
-        else
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIODevLockContention);
+        STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0);
     }
     else
@@ -709,10 +706,10 @@
         {
             STAM_COUNTER_INC(&pStats->WriteRZToR3);
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOWritesToR3);
+            STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3);
         }
         else
         {
             STAM_COUNTER_INC(&pStats->ReadRZToR3);
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOReadsToR3);
+            STAM_COUNTER_INC(&pVM->iom.s.StatMmioReadsR0ToR3);
         }
     }
@@ -721,6 +718,4 @@
     RT_NOREF(pVM, pRegEntry);
 #endif /* IN_RING3 */
-
-    STAM_PROFILE_STOP(&pVM->iom.s.StatRZMMIOHandler, a);
     return rcStrict;
 }
@@ -736,5 +731,5 @@
                                              RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser)
 {
-    STAM_COUNTER_INC(&pVM->iom.s.StatMmioPfHandlerNew);
+    STAM_PROFILE_START(&pVM->iom.s.StatMmioPfHandler, Prf);
     LogFlow(("iomMmioPfHandlerNew: GCPhys=%RGp uErr=%#x pvFault=%RGv rip=%RGv\n",
              GCPhysFault, (uint32_t)uErrorCode, pvFault, (RTGCPTR)pCtxCore->rip));
@@ -750,5 +745,8 @@
 # endif
 
-    return iomMmioCommonPfHandlerNew(pVM, pVCpu, (uint32_t)uErrorCode, GCPhysFault, pRegEntry);
+    VBOXSTRICTRC rcStrict = iomMmioCommonPfHandlerNew(pVM, pVCpu, (uint32_t)uErrorCode, GCPhysFault, pRegEntry);
+
+    STAM_PROFILE_STOP(&pVM->iom.s.StatMmioPfHandler, Prf);
+    return rcStrict;
 }
 
@@ -769,5 +767,5 @@
 VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault)
 {
-    STAM_COUNTER_INC(&pVM->iom.s.StatMmioPhysHandlerNew);
+    STAM_PROFILE_START(&pVM->iom.s.StatMmioPhysHandler, Prf);
 
     /*
@@ -787,4 +785,6 @@
     else if (rcStrict == VERR_SEM_BUSY)
         rcStrict = VINF_IOM_R3_MMIO_READ_WRITE;
+
+    STAM_PROFILE_STOP(&pVM->iom.s.StatMmioPhysHandler, Prf);
     return rcStrict;
 }
@@ -801,5 +801,5 @@
 {
     STAM_PROFILE_START(UnusedMacroArg, Prf);
-    STAM_COUNTER_INC(&pVM->iom.s.CTX_SUFF(StatMmioHandlerNew));
+    STAM_COUNTER_INC(&pVM->iom.s.CTX_SUFF(StatMmioHandler));
     Log4(("iomMmioHandlerNew: GCPhysFault=%RGp cbBuf=%#x enmAccessType=%d enmOrigin=%d pvUser=%p\n", GCPhysFault, cbBuf, enmAccessType, enmOrigin, pvUser));
 
@@ -867,5 +867,5 @@
               pDevIns, pvUser));
         STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pStats->ReadRZToR3 : &pStats->WriteRZToR3);
-        STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatRZMMIOReadsToR3 : &pVM->iom.s.StatRZMMIOWritesToR3);
+        STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatMmioReadsR0ToR3 : &pVM->iom.s.StatMmioWritesR0ToR3);
         return rcToRing3;
     }
@@ -887,5 +887,5 @@
     else
     {
-        STAM_REL_COUNTER_INC(&pVM->iom.s.StatMMIOStaleMappings);
+        STAM_REL_COUNTER_INC(&pVM->iom.s.StatMmioStaleMappings);
         LogRelMax(64, ("iomMmioHandlerNew: Stale access at %#RGp to range #%#x currently residing at %RGp LB %RGp\n",
                        GCPhysFault, pRegEntry->idxSelf, GCPhysMapping, pRegEntry->cbRegion));
@@ -896,5 +896,5 @@
 #else
         STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pStats->ReadRZToR3 : &pStats->WriteRZToR3);
-        STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatRZMMIOReadsToR3 : &pVM->iom.s.StatRZMMIOWritesToR3);
+        STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatMmioReadsR0ToR3 : &pVM->iom.s.StatMmioWritesR0ToR3);
         return rcToRing3;
 #endif
@@ -925,5 +925,5 @@
             {
                 STAM_COUNTER_INC(&pStats->ReadRZToR3);
-                STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOReadsToR3);
+                STAM_COUNTER_INC(&pVM->iom.s.StatMmioReadsR0ToR3);
             }
             else
@@ -945,10 +945,10 @@
             {
                 STAM_COUNTER_INC(&pStats->WriteRZToR3);
-                STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOWritesToR3);
+                STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3);
             }
             else if (rcStrict == VINF_IOM_R3_MMIO_COMMIT_WRITE)
             {
                 STAM_COUNTER_INC(&pStats->CommitRZToR3);
-                STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOCommitsToR3);
+                STAM_COUNTER_INC(&pVM->iom.s.StatMmioCommitsR0ToR3);
             }
             else
@@ -991,12 +991,12 @@
         {
             STAM_COUNTER_INC(&pStats->CommitRZToR3);
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOCommitsToR3);
+            STAM_COUNTER_INC(&pVM->iom.s.StatMmioCommitsR0ToR3);
         }
         else
         {
             STAM_COUNTER_INC(&pStats->WriteRZToR3);
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOWritesToR3);
-        }
-        STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIODevLockContention);
+            STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3);
+        }
+        STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0);
     }
     else if (rcStrict == VINF_IOM_R3_MMIO_READ)
@@ -1004,5 +1004,5 @@
         Assert(enmAccessType == PGMACCESSTYPE_READ);
         STAM_COUNTER_INC(&pStats->ReadRZToR3);
-        STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIODevLockContention);
+        STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0);
     }
 #endif
Index: /trunk/src/VBox/VMM/VMMR3/IOM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/IOM.cpp	(revision 82379)
+++ /trunk/src/VBox/VMM/VMMR3/IOM.cpp	(revision 82380)
@@ -173,29 +173,24 @@
 
     /*
-     * Statistics.
-     */
-    STAM_REG(pVM, &pVM->iom.s.StatIoPortCommits,      STAMTYPE_COUNTER, "/IOM/IoPortCommits",                       STAMUNIT_OCCURENCES,     "Number of ring-3 I/O port commits.");
-    STAM_REG(pVM, &pVM->iom.s.StatIoPortIn,           STAMTYPE_PROFILE, "/IOM/IoPortIN",                            STAMUNIT_OCCURENCES,     "Number of IN instructions (attempts)");
-    STAM_REG(pVM, &pVM->iom.s.StatIoPortInS,          STAMTYPE_PROFILE, "/IOM/IoPortINS",                           STAMUNIT_OCCURENCES,     "Number of INS instructions (attempts)");
-    STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS,         STAMTYPE_PROFILE, "/IOM/IoPortOUT",                           STAMUNIT_OCCURENCES,     "Number of OUT instructions (attempts)");
-    STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS,         STAMTYPE_PROFILE, "/IOM/IoPortOUTS",                          STAMUNIT_OCCURENCES,     "Number of OUTS instructions (attempts)");
-
-    STAM_REL_REG(pVM, &pVM->iom.s.StatMMIOStaleMappings, STAMTYPE_PROFILE, "/IOM/MMIOStaleMappings",                STAMUNIT_TICKS_PER_CALL, "Number of times iomMmioHandlerNew got a call for a remapped range at the old mapping.");
-    STAM_REG(pVM, &pVM->iom.s.StatRZMMIOHandler,      STAMTYPE_PROFILE, "/IOM/RZ-MMIOHandler",                      STAMUNIT_TICKS_PER_CALL, "Profiling of the iomMmioPfHandler() body, only success calls.");
-    STAM_REG(pVM, &pVM->iom.s.StatRZMMIOReadsToR3,    STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/ReadsToR3",            STAMUNIT_OCCURENCES,     "Number of read deferred to ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatRZMMIOWritesToR3,   STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/WritesToR3",           STAMUNIT_OCCURENCES,     "Number of writes deferred to ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatRZMMIOCommitsToR3,  STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/CommitsToR3",          STAMUNIT_OCCURENCES,     "Number of commits deferred to ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatRZMMIODevLockContention, STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/DevLockContention", STAMUNIT_OCCURENCES,   "Number of device lock contention force return to ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatR3MMIOHandler,      STAMTYPE_COUNTER, "/IOM/R3-MMIOHandler",                      STAMUNIT_OCCURENCES,     "Number of calls to iomMmioHandler.");
-
-    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR3,      STAMTYPE_COUNTER, "/IOM/OldMmioHandlerR3",                    STAMUNIT_OCCURENCES,     "Number of calls to old iomMmioHandler from ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR0,      STAMTYPE_COUNTER, "/IOM/OldMmioHandlerR0",                    STAMUNIT_OCCURENCES,     "Number of calls to old iomMmioHandler from ring-0.");
-
-    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR3,   STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR3",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioHandlerNew from ring-3.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR0,   STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR0",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioHandlerNew from ring-0.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandlerNew,   STAMTYPE_COUNTER, "/IOM/MmioPfHandlerNew",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioPfHandlerNew.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandlerNew, STAMTYPE_COUNTER, "/IOM/MmioPhysHandlerNew",                  STAMUNIT_OCCURENCES,     "Number of calls to IOMR0MmioPhysHandler.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsDirect,  STAMTYPE_COUNTER, "/IOM/MmioCommitsDirect",                   STAMUNIT_OCCURENCES,     "Number of ring-3 MMIO commits direct to handler via handle hint.");
-    STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsPgm,     STAMTYPE_COUNTER, "/IOM/MmioCommitsPgm",                      STAMUNIT_OCCURENCES,     "Number of ring-3 MMIO commits via PGM.");
+     * Statistics (names are somewhat contorted to make the registration
+     * sub-trees appear at the end of each group).
+     */
+    STAM_REG(pVM, &pVM->iom.s.StatIoPortCommits,    STAMTYPE_COUNTER, "/IOM/IoPortCommits",     STAMUNIT_OCCURENCES, "Number of ring-3 I/O port commits.");
+    STAM_REG(pVM, &pVM->iom.s.StatIoPortIn,         STAMTYPE_PROFILE, "/IOM/IoPortIN",          STAMUNIT_OCCURENCES, "Number of IN instructions (attempts)");
+    STAM_REG(pVM, &pVM->iom.s.StatIoPortInS,        STAMTYPE_PROFILE, "/IOM/IoPortINS",         STAMUNIT_OCCURENCES, "Number of INS instructions (attempts)");
+    STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS,       STAMTYPE_PROFILE, "/IOM/IoPortOUT",         STAMUNIT_OCCURENCES, "Number of OUT instructions (attempts)");
+    STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS,       STAMTYPE_PROFILE, "/IOM/IoPortOUTS",        STAMUNIT_OCCURENCES, "Number of OUTS instructions (attempts)");
+
+    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR3,    STAMTYPE_COUNTER, "/IOM/MmioHandlerR3",     STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-3.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR0,    STAMTYPE_COUNTER, "/IOM/MmioHandlerR0",     STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-0.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioReadsR0ToR3,  STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Reads",   STAMUNIT_OCCURENCES, "Number of reads deferred to ring-3.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioWritesR0ToR3, STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Writes",  STAMUNIT_OCCURENCES, "Number of writes deferred to ring-3.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsR0ToR3,STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Commits", STAMUNIT_OCCURENCES, "Number of commits deferred to ring-3.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandler,    STAMTYPE_PROFILE, "/IOM/MmioPfHandler",     STAMUNIT_OCCURENCES, "Number of calls to iomMmioPfHandlerNew.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandler,  STAMTYPE_PROFILE, "/IOM/MmioPhysHandler",   STAMUNIT_OCCURENCES, "Number of calls to IOMR0MmioPhysHandler.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsDirect,STAMTYPE_COUNTER, "/IOM/MmioCommitsDirect", STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits direct to handler via handle hint.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsPgm,   STAMTYPE_COUNTER, "/IOM/MmioCommitsPgm",    STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits via PGM.");
+    STAM_REL_REG(pVM, &pVM->iom.s.StatMmioStaleMappings,   STAMTYPE_PROFILE, "/IOM/MmioMappingsStale",              STAMUNIT_TICKS_PER_CALL, "Number of times iomMmioHandlerNew got a call for a remapped range at the old mapping.");
+    STAM_REG(pVM, &pVM->iom.s.StatMmioDevLockContentionR0, STAMTYPE_COUNTER, "/IOM/MmioDevLockContentionR0",        STAMUNIT_OCCURENCES,     "Number of device lock contention force return to ring-3.");
 
     LogFlow(("IOMR3Init: returns VINF_SUCCESS\n"));
Index: /trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp	(revision 82379)
+++ /trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp	(revision 82380)
@@ -52,5 +52,5 @@
     /* Format the prefix: */
     char                 szName[80];
-    size_t               cchPrefix = RTStrPrintf(szName, sizeof(szName), "/IOM/NewMmio/%RGp-%RGp",
+    size_t               cchPrefix = RTStrPrintf(szName, sizeof(szName), "/IOM/MmioRegions/%RGp-%RGp",
                                                  pRegEntry->GCPhysMapping, pRegEntry->GCPhysMapping + pRegEntry->cbRegion - 1);
 
@@ -106,5 +106,5 @@
 {
     char szPrefix[80];
-    RTStrPrintf(szPrefix, sizeof(szPrefix), "/IOM/NewMmio/%RGp-%RGp", GCPhys, GCPhys + pRegEntry->cbRegion - 1);
+    RTStrPrintf(szPrefix, sizeof(szPrefix), "/IOM/MmioRegions/%RGp-%RGp", GCPhys, GCPhys + pRegEntry->cbRegion - 1);
     STAMR3DeregisterByPrefix(pVM->pUVM, szPrefix);
 }
Index: /trunk/src/VBox/VMM/include/IOMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/IOMInternal.h	(revision 82379)
+++ /trunk/src/VBox/VMM/include/IOMInternal.h	(revision 82380)
@@ -456,31 +456,20 @@
     STAMCOUNTER                     StatIoPortInS;
     STAMCOUNTER                     StatIoPortOutS;
+    STAMCOUNTER                     StatIoPortCommits;
     /** @} */
 
     /** @name MMIO statistics.
      * @{ */
-    STAMCOUNTER                     StatIoPortCommits;
-
-    STAMCOUNTER                     StatMMIOStaleMappings;
-    STAMPROFILE                     StatRZMMIOHandler;
-    STAMCOUNTER                     StatRZMMIOReadsToR3;
-    STAMCOUNTER                     StatRZMMIOWritesToR3;
-    STAMCOUNTER                     StatRZMMIOCommitsToR3;
-    STAMCOUNTER                     StatRZMMIODevLockContention;
-
-    STAMCOUNTER                     StatMmioPfHandlerNew;
-    STAMCOUNTER                     StatMmioPhysHandlerNew;
-    STAMCOUNTER                     StatMmioHandlerNewR3;
-    STAMCOUNTER                     StatMmioHandlerNewR0;
+    STAMPROFILE                     StatMmioPfHandler;
+    STAMPROFILE                     StatMmioPhysHandler;
+    STAMCOUNTER                     StatMmioHandlerR3;
+    STAMCOUNTER                     StatMmioHandlerR0;
+    STAMCOUNTER                     StatMmioReadsR0ToR3;
+    STAMCOUNTER                     StatMmioWritesR0ToR3;
+    STAMCOUNTER                     StatMmioCommitsR0ToR3;
     STAMCOUNTER                     StatMmioCommitsDirect;
     STAMCOUNTER                     StatMmioCommitsPgm;
-
-    STAMCOUNTER                     StatR3MMIOHandler;
-
-    STAMCOUNTER                     StatMmioHandlerR3;
-    STAMCOUNTER                     StatMmioHandlerR0;
-
-    RTUINT                          cMovsMaxBytes;
-    RTUINT                          cStosMaxBytes;
+    STAMCOUNTER                     StatMmioStaleMappings;
+    STAMCOUNTER                     StatMmioDevLockContentionR0;
     /** @} */
 } IOM;
