Changeset 14857 in vbox for trunk/src/VBox
- Timestamp:
- Dec 1, 2008 1:43:57 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r14850 r14857 1597 1597 1598 1598 /* R0 only: */ 1599 STAM_REG(pVM, &pPGM->StatR0DynMapPage, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage" , STAMUNIT_OCCURENCES, "Calls to pgmR0DynMapPage");1600 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlow, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/Slow" , STAMUNIT_OCCURENCES, "Calls to pgmR0DynMapPageSlow - subtract this from pgmR0DynMapPage to get 1st level hits.");1601 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlowLoopHits, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/SlowLoopHits" , STAMUNIT_OCCURENCES, "Hits in the loop path.");1602 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlowLoopMisses, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/SlowLoopMisses", STAMUNIT_OCCURENCES, "Misses in the loop path. NonLoopMisses = Slow - SlowLoopHit - SlowLoopMisses");1603 1599 STAM_REG(pVM, &pPGM->StatR0DynMapHCPage, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/HCPage", STAMUNIT_OCCURENCES, "Calls to PGMDynMapHCPage (ring-0)."); 1604 1600 STAM_REG(pVM, &pPGM->StatR0DynMapHCPageSetOptimize, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/HCPageSetOptimize", STAMUNIT_OCCURENCES, "Calls to pgmDynMapOptimizeAutoSet."); 1605 1601 STAM_REG(pVM, &pPGM->StatR0DynMapHCPageSetSearchHits, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/HCPageSetSearchHits", STAMUNIT_OCCURENCES, "Set search hits."); 1606 1602 STAM_REG(pVM, &pPGM->StatR0DynMapHCPageSetSearchMisses, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/HCPageSetSearchMisses", STAMUNIT_OCCURENCES, "Set search misses."); 1603 STAM_REG(pVM, &pPGM->StatR0DynMapMigrateInvlPg, STAMTYPE_COUNTER, "/PGM/R0/DynMapMigrateInvlPg", STAMUNIT_OCCURENCES, "invlpg count in PGMDynMapMigrateAutoSet."); 1604 STAM_REG(pVM, &pPGM->StatR0DynMapPage, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage", STAMUNIT_OCCURENCES, "Calls to pgmR0DynMapPage"); 1605 STAM_REG(pVM, &pPGM->StatR0DynMapPageInvlPg, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/InvlPg", STAMUNIT_OCCURENCES, "invlpg count in pgmR0DynMapPageSlow."); 1606 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlow, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/Slow", STAMUNIT_OCCURENCES, "Calls to pgmR0DynMapPageSlow - subtract this from pgmR0DynMapPage to get 1st level hits."); 1607 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlowLoopHits, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/SlowLoopHits" , STAMUNIT_OCCURENCES, "Hits in the loop path."); 1608 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlowLoopMisses, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/SlowLoopMisses", STAMUNIT_OCCURENCES, "Misses in the loop path. NonLoopMisses = Slow - SlowLoopHit - SlowLoopMisses"); 1609 STAM_REG(pVM, &pPGM->StatR0DynMapPageSlowLostHits, STAMTYPE_COUNTER, "/PGM/R0/DynMapPage/SlowLostHits", STAMUNIT_OCCURENCES, "Lost hits."); 1607 1610 1608 1611 /* GC only: */ -
trunk/src/VBox/VMM/PGMInternal.h
r14850 r14857 2561 2561 2562 2562 /* R0 only: */ 2563 STAMCOUNTER StatR0DynMapPage; /**< R0: Calls to pgmR0DynMapPage. */2564 STAMCOUNTER StatR0DynMapPageSlow; /**< R0: Calls to pgmR0DynMapPageSlow. */2565 STAMCOUNTER StatR0DynMapPageSlowLoopHits; /**< R0: Hits in the pgmR0DynMapPageSlow search loop. */2566 STAMCOUNTER StatR0DynMapPageSlowLoopMisses; /**< R0: Misses in the pgmR0DynMapPageSlow search loop. */2567 2563 STAMCOUNTER StatR0DynMapHCPage; /**< R0: Calls to PGMDynMapHCPage. */ 2568 2564 STAMCOUNTER StatR0DynMapHCPageSetOptimize; /**< R0: Calls to pgmDynMapOptimizeAutoSet. */ 2569 2565 STAMCOUNTER StatR0DynMapHCPageSetSearchHits; /**< R0: Set search hits. */ 2570 2566 STAMCOUNTER StatR0DynMapHCPageSetSearchMisses; /**< R0: Set search misses. */ 2567 STAMCOUNTER StatR0DynMapMigrateInvlPg; /**< R0: invlpg in PGMDynMapMigrateAutoSet. */ 2568 STAMCOUNTER StatR0DynMapPage; /**< R0: Calls to pgmR0DynMapPage. */ 2569 STAMCOUNTER StatR0DynMapPageInvlPg; /**< R0: invlpg. */ 2570 STAMCOUNTER StatR0DynMapPageSlow; /**< R0: Calls to pgmR0DynMapPageSlow. */ 2571 STAMCOUNTER StatR0DynMapPageSlowLoopHits; /**< R0: Hits in the pgmR0DynMapPageSlow search loop. */ 2572 STAMCOUNTER StatR0DynMapPageSlowLoopMisses; /**< R0: Misses in the pgmR0DynMapPageSlow search loop. */ 2573 STAMCOUNTER StatR0DynMapPageSlowLostHits; /**< R0: Lost hits. */ 2571 2574 2572 2575 /* RC only: */ -
trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp
r14853 r14857 1177 1177 * already has made sure they aren't matching. 1178 1178 */ 1179 #ifdef VBOX_WITH_STATISTICS 1180 bool fLooped = false; 1181 #endif 1179 1182 uint32_t const cPages = pThis->cPages; 1180 1183 PPGMR0DYNMAPENTRY paPages = pThis->paPages; … … 1212 1215 } 1213 1216 STAM_COUNTER_INC(&pVM->pgm.s.StatR0DynMapPageSlowLoopMisses); 1217 #ifdef VBOX_WITH_STATISTICS 1218 fLooped = true; 1219 #endif 1214 1220 } 1215 1221 Assert(iFreePage < cPages); 1222 1223 #ifdef VBOX_WITH_STATISTICS 1224 /* Check for lost hits. */ 1225 if (!fLooped) 1226 for (uint32_t iPage2 = (iPage + 5) % cPages; iPage2 != iPage; iPage2 = (iPage2 + 1) % cPages) 1227 if (paPages[iPage2].HCPhys == HCPhys) 1228 STAM_COUNTER_INC(&pVM->pgm.s.StatR0DynMapPageSlowLostHits); 1229 #endif 1216 1230 1217 1231 /* … … 1341 1355 * Do the actual invalidation outside the spinlock. 1342 1356 */ 1343 ASMInvalidatePage(pvPage); 1357 if (fInvalidateIt) 1358 { 1359 STAM_COUNTER_INC(&pVM->pgm.s.StatR0DynMapPageInvlPg); 1360 ASMInvalidatePage(pvPage); 1361 } 1344 1362 1345 1363 *ppvPage = pvPage; … … 1571 1589 RTCpuSetDel(&pThis->paPages[iPage].PendingSet, idRealCpu); 1572 1590 ASMInvalidatePage(pThis->paPages[iPage].pvPage); 1591 STAM_COUNTER_INC(&pVCpu->pVMR0->pgm.s.StatR0DynMapMigrateInvlPg); 1573 1592 } 1574 1593 }
Note:
See TracChangeset
for help on using the changeset viewer.