Changeset 31126 in vbox
- Timestamp:
- Jul 26, 2010 6:21:50 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInline.h
r31123 r31126 303 303 PPGMMAPSET pSet = &pPGMCPU->AutoSet; 304 304 305 STAM_PROFILE_START(&pPGMCPU-> StatR0DynMapHCPageInl, a);305 STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a); 306 306 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 307 307 Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries)); … … 313 313 { 314 314 *ppv = pSet->aEntries[iEntry].pvPage; 315 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapHCPageInlHits);315 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlHits); 316 316 } 317 317 else 318 318 { 319 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapHCPageInlMisses);319 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlMisses); 320 320 pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv); 321 321 } 322 322 323 STAM_PROFILE_STOP(&pPGMCPU-> StatR0DynMapHCPageInl, a);323 STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a); 324 324 return VINF_SUCCESS; 325 325 } … … 340 340 PPGMCPU pPGMCPU = (PPGMCPU)((uint8_t *)VMMGetCpu(pVM) + pPGM->offVCpuPGM); /* very pretty ;-) */ 341 341 342 STAM_PROFILE_START(&pPGMCPU-> StatR0DynMapGCPageInl, a);342 STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 343 343 AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("%RGp\n", GCPhys)); 344 344 … … 352 352 { 353 353 /* This case is not counted into StatR0DynMapGCPageInl. */ 354 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlRamMisses);354 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses); 355 355 return PGMDynMapGCPage(pVM, GCPhys, ppv); 356 356 } 357 357 358 358 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]); 359 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlRamHits);359 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits); 360 360 361 361 /* … … 372 372 { 373 373 *ppv = pSet->aEntries[iEntry].pvPage; 374 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlHits);374 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits); 375 375 } 376 376 else 377 377 { 378 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlMisses);378 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses); 379 379 pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv); 380 380 } 381 381 382 STAM_PROFILE_STOP(&pPGMCPU-> StatR0DynMapGCPageInl, a);382 STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 383 383 return VINF_SUCCESS; 384 384 } … … 410 410 { 411 411 /* This case is not counted into StatR0DynMapGCPageInl. */ 412 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlRamMisses);412 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses); 413 413 return PGMDynMapGCPageOff(pVM, GCPhys, ppv); 414 414 } 415 415 416 416 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]); 417 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlRamHits);417 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits); 418 418 419 419 /* … … 430 430 { 431 431 *ppv = (void *)((uintptr_t)pSet->aEntries[iEntry].pvPage | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys)); 432 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlHits);432 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits); 433 433 } 434 434 else 435 435 { 436 STAM_COUNTER_INC(&pPGMCPU-> StatR0DynMapGCPageInlMisses);436 STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses); 437 437 pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv); 438 438 *ppv = (void *)((uintptr_t)*ppv | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys)); 439 439 } 440 440 441 STAM_PROFILE_STOP(&pPGMCPU-> StatR0DynMapGCPageInl, a);441 STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 442 442 return VINF_SUCCESS; 443 443 } -
trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp
r29259 r31126 1186 1186 PVMCPU pVCpu = VMMGetCpu(pVM); 1187 1187 #endif 1188 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageSlow);1188 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlow); 1189 1189 1190 1190 /* … … 1214 1214 if (paPages[iFreePage].HCPhys == HCPhys) 1215 1215 { 1216 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageSlowLoopHits);1216 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlowLoopHits); 1217 1217 return iFreePage; 1218 1218 } … … 1225 1225 return UINT32_MAX; 1226 1226 } 1227 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageSlowLoopMisses);1227 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlowLoopMisses); 1228 1228 #ifdef VBOX_WITH_STATISTICS 1229 1229 fLooped = true; … … 1291 1291 RTSpinlockAcquire(pThis->hSpinlock, &Tmp); 1292 1292 AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%RHp\n", HCPhys)); 1293 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPage);1293 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPage); 1294 1294 1295 1295 /* … … 1305 1305 PPGMR0DYNMAPENTRY paPages = pThis->paPages; 1306 1306 if (RT_LIKELY(paPages[iPage].HCPhys == HCPhys)) 1307 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageHits0);1307 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits0); 1308 1308 else 1309 1309 { … … 1312 1312 { 1313 1313 iPage = iPage2; 1314 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageHits1);1314 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits1); 1315 1315 } 1316 1316 else … … 1320 1320 { 1321 1321 iPage = iPage2; 1322 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageHits2);1322 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits2); 1323 1323 } 1324 1324 else … … 1369 1369 if (RT_UNLIKELY(fInvalidateIt)) 1370 1370 { 1371 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapPageInvlPg);1371 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageInvlPg); 1372 1372 ASMInvalidatePage(pvPage); 1373 1373 } … … 1593 1593 pSet->iCpu = -1; 1594 1594 1595 STAM_COUNTER_INC(&pVCpu->pgm.s. aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);1595 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]); 1596 1596 AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries)); 1597 1597 if (cEntries > RT_ELEMENTS(pSet->aEntries) * 50 / 100) … … 1617 1617 uint32_t cEntries = pSet->cEntries; 1618 1618 AssertReturnVoid(cEntries != PGMMAPSET_CLOSED); 1619 STAM_COUNTER_INC(&pVCpu->pgm.s. aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);1619 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]); 1620 1620 if (cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100) 1621 1621 { … … 1671 1671 1672 1672 ASMInvalidatePage(pThis->paPages[iPage].pvPage); 1673 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapMigrateInvlPg);1673 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapMigrateInvlPg); 1674 1674 1675 1675 RTSpinlockAcquire(pThis->hSpinlock, &Tmp); … … 1749 1749 1750 1750 pSet->iSubset = pSet->cEntries; 1751 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapSubsets);1751 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSubsets); 1752 1752 return iPrevSubset; 1753 1753 } … … 1767 1767 AssertReturnVoid(cEntries != PGMMAPSET_CLOSED); 1768 1768 AssertReturnVoid(pSet->iSubset >= iPrevSubset || iPrevSubset == UINT32_MAX); 1769 STAM_COUNTER_INC(&pVCpu->pgm.s. aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);1769 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]); 1770 1770 if ( cEntries >= RT_ELEMENTS(pSet->aEntries) * 40 / 100 1771 1771 && cEntries != pSet->iSubset) … … 1915 1915 { 1916 1916 pSet->aEntries[i].cRefs++; 1917 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapSetSearchHits);1917 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchHits); 1918 1918 break; 1919 1919 } 1920 1920 if (i < 0) 1921 1921 { 1922 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapSetSearchMisses);1922 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchMisses); 1923 1923 if (pSet->iSubset < pSet->cEntries) 1924 1924 { 1925 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapSetSearchFlushes);1926 STAM_COUNTER_INC(&pVCpu->pgm.s. aStatR0DynMapSetSize[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);1925 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchFlushes); 1926 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]); 1927 1927 AssertMsg(pSet->cEntries < PGMMAPSET_MAX_FILL, ("%u\n", pSet->cEntries)); 1928 1928 pgmDynMapFlushSubset(pSet); … … 1931 1931 if (RT_UNLIKELY(pSet->cEntries >= RT_ELEMENTS(pSet->aEntries))) 1932 1932 { 1933 STAM_COUNTER_INC(&pVCpu->pgm.s. StatR0DynMapSetOptimize);1933 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetOptimize); 1934 1934 pgmDynMapOptimizeAutoSet(pSet); 1935 1935 } -
trunk/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
r30910 r31126 1 1 /* $Id$ */ 2 2 /** @file 3 * PGM - Page Manager and Monitor, Ring-0.3 * PGM - Page Manager and Monitor, Page Sharing, Ring-0. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 20 07Oracle Corporation7 * Copyright (C) 2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as
Note:
See TracChangeset
for help on using the changeset viewer.