Changeset 13087 in vbox
- Timestamp:
- Oct 8, 2008 3:38:52 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r13085 r13087 1499 1499 */ 1500 1500 1501 /* Common */ 1502 #ifdef PGMPOOL_WITH_GCPHYS_TRACKING 1503 STAM_REG(pVM, &pPGM->StatTrackVirgin, STAMTYPE_COUNTER, "/PGM/Track/Virgin", STAMUNIT_OCCURENCES, "The number of first time shadowings"); 1504 STAM_REG(pVM, &pPGM->StatTrackAliased, STAMTYPE_COUNTER, "/PGM/Track/Aliased", STAMUNIT_OCCURENCES, "The number of times switching to cRef2, i.e. the page is being shadowed by two PTs."); 1505 STAM_REG(pVM, &pPGM->StatTrackAliasedMany, STAMTYPE_COUNTER, "/PGM/Track/AliasedMany", STAMUNIT_OCCURENCES, "The number of times we're tracking using cRef2."); 1506 STAM_REG(pVM, &pPGM->StatTrackAliasedLots, STAMTYPE_COUNTER, "/PGM/Track/AliasedLots", STAMUNIT_OCCURENCES, "The number of times we're hitting pages which has overflowed cRef2"); 1507 STAM_REG(pVM, &pPGM->StatTrackOverflows, STAMTYPE_COUNTER, "/PGM/Track/Overflows", STAMUNIT_OCCURENCES, "The number of times the extent list grows to long."); 1508 STAM_REG(pVM, &pPGM->StatTrackDeref, STAMTYPE_PROFILE, "/PGM/Track/Deref", STAMUNIT_OCCURENCES, "Profiling of SyncPageWorkerTrackDeref (expensive)."); 1509 #endif 1510 1501 1511 /* R3 only: */ 1512 STAM_REG(pVM, &pPGM->StatR3DetectedConflicts, STAMTYPE_COUNTER, "/PGM/R3/DetectedConflicts", STAMUNIT_OCCURENCES, "The number of times PGMR3CheckMappingConflicts() detected a conflict."); 1513 STAM_REG(pVM, &pPGM->StatR3ResolveConflict, STAMTYPE_PROFILE, "/PGM/R3/ResolveConflict", STAMUNIT_TICKS_PER_CALL, "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation)."); 1514 STAM_REG(pVM, &pPGM->StatR3GuestPDWrite, STAMTYPE_COUNTER, "/PGM/R3/PDWrite", STAMUNIT_OCCURENCES, "The total number of times pgmHCGuestPDWriteHandler() was called."); 1515 STAM_REG(pVM, &pPGM->StatR3GuestPDWriteConflict, STAMTYPE_COUNTER, "/PGM/R3/PDWriteConflict", STAMUNIT_OCCURENCES, "The number of times pgmHCGuestPDWriteHandler() detected a conflict."); 1502 1516 1503 1517 /* GC only: */ 1504 STAM_REG(pVM, &pPGM->StatGCInvalidatePage, STAMTYPE_PROFILE, "/PGM/GCInvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling."); 1518 STAM_REG(pVM, &pPGM->StatRCInvalidatePage, STAMTYPE_PROFILE, "/PGM/RC/InvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling."); 1519 STAM_REG(pVM, &pPGM->StatRCDynMapCacheHits, STAMTYPE_COUNTER, "/PGM/RC/DynMapCache/Hits" , STAMUNIT_OCCURENCES, "Number of dynamic page mapping cache hits."); 1520 STAM_REG(pVM, &pPGM->StatRCDynMapCacheMisses, STAMTYPE_COUNTER, "/PGM/RC/DynMapCache/Misses" , STAMUNIT_OCCURENCES, "Number of dynamic page mapping cache misses."); 1505 1521 1506 1522 /* RZ only: */ … … 1532 1548 STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersUnhandled, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Unhandled", STAMUNIT_OCCURENCES, "Number of traps due to access outside range of monitored page(s)."); 1533 1549 STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersInvalid, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Invalid", STAMUNIT_OCCURENCES, "Number of traps due to access to invalid physical memory."); 1534 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPRead", STAMUNIT_OCCURENCES, "Number of user mode not present read page faults."); 1535 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPWrite", STAMUNIT_OCCURENCES, "Number of user mode not present write page faults."); 1536 STAM_REG(pVM, &pPGM->StatRZTrap0eUSWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Write", STAMUNIT_OCCURENCES, "Number of user mode write page faults."); 1537 STAM_REG(pVM, &pPGM->StatRZTrap0eUSReserved, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Reserved", STAMUNIT_OCCURENCES, "Number of user mode reserved bit page faults."); 1538 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNXE, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NXE", STAMUNIT_OCCURENCES, "Number of user mode NXE page faults."); 1539 STAM_REG(pVM, &pPGM->StatRZTrap0eUSRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Read", STAMUNIT_OCCURENCES, "Number of user mode read page faults."); 1540 STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPRead", STAMUNIT_OCCURENCES, "Number of supervisor mode not present read page faults."); 1541 STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPWrite", STAMUNIT_OCCURENCES, "Number of supervisor mode not present write page faults."); 1542 STAM_REG(pVM, &pPGM->StatRZTrap0eSVWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Write", STAMUNIT_OCCURENCES, "Number of supervisor mode write page faults."); 1543 STAM_REG(pVM, &pPGM->StatRZTrap0eSVReserved, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Reserved", STAMUNIT_OCCURENCES, "Number of supervisor mode reserved bit page faults."); 1544 STAM_REG(pVM, &pPGM->StatRZTrap0eSNXE, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NXE", STAMUNIT_OCCURENCES, "Number of supervisor mode NXE page faults."); 1545 STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPF, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPF", STAMUNIT_OCCURENCES, "Number of real guest page faults."); 1546 STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPFMapping, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPFInMapping", STAMUNIT_OCCURENCES, "Number of real guest page faults in a mapping."); 1547 STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulInRZ, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/InRZ", STAMUNIT_OCCURENCES, "Number of guest page faults due to X86_CR0_WP emulation."); 1548 STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulToR3, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/ToR3", STAMUNIT_OCCURENCES, "Number of guest page faults due to X86_CR0_WP emulation (forward to R3 for emulation)."); 1550 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPRead", STAMUNIT_OCCURENCES, "Number of user mode not present read page faults."); 1551 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPWrite", STAMUNIT_OCCURENCES, "Number of user mode not present write page faults."); 1552 STAM_REG(pVM, &pPGM->StatRZTrap0eUSWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Write", STAMUNIT_OCCURENCES, "Number of user mode write page faults."); 1553 STAM_REG(pVM, &pPGM->StatRZTrap0eUSReserved, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Reserved", STAMUNIT_OCCURENCES, "Number of user mode reserved bit page faults."); 1554 STAM_REG(pVM, &pPGM->StatRZTrap0eUSNXE, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NXE", STAMUNIT_OCCURENCES, "Number of user mode NXE page faults."); 1555 STAM_REG(pVM, &pPGM->StatRZTrap0eUSRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Read", STAMUNIT_OCCURENCES, "Number of user mode read page faults."); 1556 STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentRead, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPRead", STAMUNIT_OCCURENCES, "Number of supervisor mode not present read page faults."); 1557 STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPWrite", STAMUNIT_OCCURENCES, "Number of supervisor mode not present write page faults."); 1558 STAM_REG(pVM, &pPGM->StatRZTrap0eSVWrite, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Write", STAMUNIT_OCCURENCES, "Number of supervisor mode write page faults."); 1559 STAM_REG(pVM, &pPGM->StatRZTrap0eSVReserved, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Reserved", STAMUNIT_OCCURENCES, "Number of supervisor mode reserved bit page faults."); 1560 STAM_REG(pVM, &pPGM->StatRZTrap0eSNXE, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NXE", STAMUNIT_OCCURENCES, "Number of supervisor mode NXE page faults."); 1561 STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPF, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPF", STAMUNIT_OCCURENCES, "Number of real guest page faults."); 1562 STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPFMapping, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPFInMapping", STAMUNIT_OCCURENCES, "Number of real guest page faults in a mapping."); 1563 STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulInRZ, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/InRZ", STAMUNIT_OCCURENCES, "Number of guest page faults due to X86_CR0_WP emulation."); 1564 STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulToR3, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/ToR3", STAMUNIT_OCCURENCES, "Number of guest page faults due to X86_CR0_WP emulation (forward to R3 for emulation)."); 1565 STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteHandled, STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteHandled", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 change was successfully handled."); 1566 STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteUnhandled, STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteUnhandled", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 change was passed back to the recompiler."); 1567 STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteConflict, STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteConflict", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 monitoring detected a conflict."); 1568 STAM_REG(pVM, &pPGM->StatRZGuestROMWriteHandled, STAMTYPE_COUNTER, "/PGM/GC/ROMWriteHandled", STAMUNIT_OCCURENCES, "The number of times the Guest ROM change was successfully handled."); 1569 STAM_REG(pVM, &pPGM->StatRZGuestROMWriteUnhandled, STAMTYPE_COUNTER, "/PGM/GC/ROMWriteUnhandled", STAMUNIT_OCCURENCES, "The number of times the Guest ROM change was passed back to the recompiler."); 1549 1570 1550 1571 /* R0 only: */ … … 1587 1608 STAM_REG(pVM, &pPGM->StatRZVirtHandlerSearchByPhys, STAMTYPE_PROFILE, "/PGM/RZ/VirtHandlerSearchByPhys", STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr."); 1588 1609 STAM_REG(pVM, &pPGM->StatRZPhysHandlerReset, STAMTYPE_COUNTER, "/PGM/RZ/PhysHandlerReset", STAMUNIT_OCCURENCES, "The number of times PGMHandlerPhysicalReset is called."); 1610 STAM_REG(pVM, &pPGM->StatRZPageOutOfSyncSupervisor, STAMTYPE_COUNTER, "/PGM/RZ/OutOfSync/SuperVisor", STAMUNIT_OCCURENCES, "Number of traps due to pages out of sync and times VerifyAccessSyncPage calls SyncPage."); 1611 STAM_REG(pVM, &pPGM->StatRZPageOutOfSyncUser, STAMTYPE_COUNTER, "/PGM/RZ/OutOfSync/User", STAMUNIT_OCCURENCES, "Number of traps due to pages out of sync and times VerifyAccessSyncPage calls SyncPage."); 1612 STAM_REG(pVM, &pPGM->StatRZPrefetch, STAMTYPE_PROFILE, "/PGM/RZ/Prefetch", STAMUNIT_TICKS_PER_CALL, "PGMPrefetchPage profiling."); 1589 1613 1590 1614 /* TODO: */ 1591 1592 1593 STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteHandled, STAMTYPE_COUNTER, "/PGM/GC/CR3WriteInt", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 change was successfully handled.");1594 STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteUnhandled, STAMTYPE_COUNTER, "/PGM/GC/CR3WriteEmu", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 change was passed back to the recompiler.");1595 STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteConflict, STAMTYPE_COUNTER, "/PGM/GC/CR3WriteConflict", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 monitoring detected a conflict.");1596 1597 STAM_REG(pVM, &pPGM->StatGCPageOutOfSyncSupervisor, STAMTYPE_COUNTER, "/PGM/GC/OutOfSync/SuperVisor", STAMUNIT_OCCURENCES, "Number of traps due to pages out of sync.");1598 STAM_REG(pVM, &pPGM->StatGCPageOutOfSyncUser, STAMTYPE_COUNTER, "/PGM/GC/OutOfSync/User", STAMUNIT_OCCURENCES, "Number of traps due to pages out of sync.");1599 1600 STAM_REG(pVM, &pPGM->StatGCGuestROMWriteHandled, STAMTYPE_COUNTER, "/PGM/GC/ROMWriteInt", STAMUNIT_OCCURENCES, "The number of times the Guest ROM change was successfully handled.");1601 STAM_REG(pVM, &pPGM->StatGCGuestROMWriteUnhandled, STAMTYPE_COUNTER, "/PGM/GC/ROMWriteEmu", STAMUNIT_OCCURENCES, "The number of times the Guest ROM change was passed back to the recompiler.");1602 1603 STAM_REG(pVM, &pPGM->StatDynMapCacheHits, STAMTYPE_COUNTER, "/PGM/GC/DynMapCache/Hits" , STAMUNIT_OCCURENCES, "Number of dynamic page mapping cache hits.");1604 STAM_REG(pVM, &pPGM->StatDynMapCacheMisses, STAMTYPE_COUNTER, "/PGM/GC/DynMapCache/Misses" , STAMUNIT_OCCURENCES, "Number of dynamic page mapping cache misses.");1605 1606 STAM_REG(pVM, &pPGM->StatHCDetectedConflicts, STAMTYPE_COUNTER, "/PGM/HC/DetectedConflicts", STAMUNIT_OCCURENCES, "The number of times PGMR3CheckMappingConflicts() detected a conflict.");1607 STAM_REG(pVM, &pPGM->StatHCGuestPDWrite, STAMTYPE_COUNTER, "/PGM/HC/PDWrite", STAMUNIT_OCCURENCES, "The total number of times pgmHCGuestPDWriteHandler() was called.");1608 STAM_REG(pVM, &pPGM->StatHCGuestPDWriteConflict, STAMTYPE_COUNTER, "/PGM/HC/PDWriteConflict", STAMUNIT_OCCURENCES, "The number of times pgmHCGuestPDWriteHandler() detected a conflict.");1609 1610 STAM_REG(pVM, &pPGM->StatHCResolveConflict, STAMTYPE_PROFILE, "/PGM/HC/ResolveConflict", STAMUNIT_TICKS_PER_CALL, "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation).");1611 STAM_REG(pVM, &pPGM->StatHCPrefetch, STAMTYPE_PROFILE, "/PGM/HC/Prefetch", STAMUNIT_TICKS_PER_CALL, "PGMR3PrefetchPage profiling.");1612 1613 1615 1614 1616 … … 1646 1648 STAM_REG(pVM, &pPGM->cZeroPages, STAMTYPE_U32, "/PGM/Page/cZeroPages", STAMUNIT_OCCURENCES, "The number of zero backed pages."); 1647 1649 1648 #ifdef PGMPOOL_WITH_GCPHYS_TRACKING1649 STAM_REG(pVM, &pPGM->StatTrackVirgin, STAMTYPE_COUNTER, "/PGM/Track/Virgin", STAMUNIT_OCCURENCES, "The number of first time shadowings");1650 STAM_REG(pVM, &pPGM->StatTrackAliased, STAMTYPE_COUNTER, "/PGM/Track/Aliased", STAMUNIT_OCCURENCES, "The number of times switching to cRef2, i.e. the page is being shadowed by two PTs.");1651 STAM_REG(pVM, &pPGM->StatTrackAliasedMany, STAMTYPE_COUNTER, "/PGM/Track/AliasedMany", STAMUNIT_OCCURENCES, "The number of times we're tracking using cRef2.");1652 STAM_REG(pVM, &pPGM->StatTrackAliasedLots, STAMTYPE_COUNTER, "/PGM/Track/AliasedLots", STAMUNIT_OCCURENCES, "The number of times we're hitting pages which has overflowed cRef2");1653 STAM_REG(pVM, &pPGM->StatTrackOverflows, STAMTYPE_COUNTER, "/PGM/Track/Overflows", STAMUNIT_OCCURENCES, "The number of times the extent list grows to long.");1654 STAM_REG(pVM, &pPGM->StatTrackDeref, STAMTYPE_PROFILE, "/PGM/Track/Deref", STAMUNIT_OCCURENCES, "Profiling of SyncPageWorkerTrackDeref (expensive).");1655 #endif1656 1650 1657 1651 for (unsigned i = 0; i < X86_PG_ENTRIES; i++) -
trunk/src/VBox/VMM/PGMGst.h
r13067 r13087 307 307 { 308 308 Log(("pgmR3Gst32BitWriteHandlerCR3: detected conflict. iPD1=%#x iPD2=%#x GCPhys=%VGp\n", iPD1, iPD2, GCPhys)); 309 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCGuestPDWriteConflict);309 STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWriteConflict); 310 310 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 311 311 } 312 312 } 313 313 314 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCGuestPDWrite);314 STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite); 315 315 return VINF_SUCCESS; 316 316 } … … 379 379 380 380 381 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCGuestPDWrite);381 STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite); 382 382 return VINF_SUCCESS; 383 383 } … … 431 431 Log(("pgmR3GstPaePD3WriteHandler: detected conflict. i=%d iPD1=%#x iPD2=%#x GCPhys=%VGp\n", 432 432 i, iPD1, iPD2, GCPhys)); 433 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCGuestPDWriteConflict);433 STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWriteConflict); 434 434 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 435 435 } … … 439 439 } 440 440 441 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCGuestPDWrite);441 STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite); 442 442 return VINF_SUCCESS; 443 443 } -
trunk/src/VBox/VMM/PGMInternal.h
r13085 r13087 2406 2406 RTR0PTR padding1; 2407 2407 2408 /* Common */ 2409 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING 2410 STAMCOUNTER StatTrackVirgin; /**< The number of first time shadowings. */ 2411 STAMCOUNTER StatTrackAliased; /**< The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */ 2412 STAMCOUNTER StatTrackAliasedMany; /**< The number of times we're tracking using cRef2. */ 2413 STAMCOUNTER StatTrackAliasedLots; /**< The number of times we're hitting pages which has overflowed cRef2. */ 2414 STAMCOUNTER StatTrackOverflows; /**< The number of times the extent list grows to long. */ 2415 STAMPROFILE StatTrackDeref; /**< Profiling of SyncPageWorkerTrackDeref (expensive). */ 2416 # endif 2417 2408 2418 /* R3 only: */ 2409 2410 /* GC only: */ 2411 STAMPROFILE StatGCInvalidatePage; /**< GC: PGMGCInvalidatePage() profiling. */ 2419 STAMCOUNTER StatR3DetectedConflicts; /**< R3: Number of times PGMR3MapHasConflicts() detected a conflict. */ 2420 STAMPROFILE StatR3ResolveConflict; /**< R3: pgmR3SyncPTResolveConflict() profiling (includes the entire relocation). */ 2421 STAMCOUNTER StatR3GuestPDWrite; /**< R3: The total number of times pgmHCGuestPDWriteHandler() was called. */ 2422 STAMCOUNTER StatR3GuestPDWriteConflict; /**< R3: The number of times GuestPDWriteContlict() detected a conflict. */ 2423 2424 /* RC only: */ 2425 STAMPROFILE StatRCInvalidatePage; /**< RC: PGMGCInvalidatePage() profiling. */ 2426 STAMCOUNTER StatRCDynMapCacheMisses; /**< RC: The number of dynamic page mapping cache hits */ 2427 STAMCOUNTER StatRCDynMapCacheHits; /**< RC: The number of dynamic page mapping cache misses */ 2412 2428 2413 2429 /* RZ only: */ … … 2454 2470 STAMCOUNTER StatRZTrap0eWPEmulInRZ; /**< RC/R0: WP=0 virtualization trap, handled. */ 2455 2471 STAMCOUNTER StatRZTrap0eWPEmulToR3; /**< RC/R0: WP=0 virtualization trap, chickened out. */ 2472 STAMCOUNTER StatRZGuestCR3WriteHandled; /**< RC/R0: The number of times WriteHandlerCR3() was successfully called. */ 2473 STAMCOUNTER StatRZGuestCR3WriteUnhandled; /**< RC/R0: The number of times WriteHandlerCR3() was called and we had to fall back to the recompiler. */ 2474 STAMCOUNTER StatRZGuestCR3WriteConflict; /**< RC/R0: The number of times WriteHandlerCR3() was called and a conflict was detected. */ 2475 STAMCOUNTER StatRZGuestROMWriteHandled; /**< RC/R0: The number of times pgmPhysRomWriteHandler() was successfully called. */ 2476 STAMCOUNTER StatRZGuestROMWriteUnhandled; /**< RC/R0: The number of times pgmPhysRomWriteHandler() was called and we had to fall back to the recompiler */ 2456 2477 2457 2478 … … 2493 2514 STAMPROFILE StatRZVirtHandlerSearchByPhys; /**< RC/R0: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2494 2515 STAMCOUNTER StatRZPhysHandlerReset; /**< RC/R0: The number of times PGMHandlerPhysicalReset is called. */ 2516 STAMCOUNTER StatRZPageOutOfSyncUser; /**< RC/R0: The number of times user page is out of sync was detected in #PF or VerifyAccessSyncPage. */ 2517 STAMCOUNTER StatRZPageOutOfSyncSupervisor; /**< RC/R0: The number of times supervisor page is out of sync was detected in in #PF or VerifyAccessSyncPage. */ 2518 STAMPROFILE StatRZPrefetch; /**< RC/R0: PGMPrefetchPage. */ 2495 2519 2496 2520 STAMPROFILE StatR3SyncCR3; /**< R3: PGMSyncCR3() profiling. */ … … 2530 2554 STAMPROFILE StatR3VirtHandlerSearchByPhys; /**< R3: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2531 2555 STAMCOUNTER StatR3PhysHandlerReset; /**< R3: The number of times PGMHandlerPhysicalReset is called. */ 2556 STAMCOUNTER StatR3PageOutOfSyncUser; /**< R3: The number of times user page is out of sync was detected in #PF or VerifyAccessSyncPage. */ 2557 STAMCOUNTER StatR3PageOutOfSyncSupervisor; /**< R3: The number of times supervisor page is out of sync was detected in in #PF or VerifyAccessSyncPage. */ 2558 STAMPROFILE StatR3Prefetch; /**< R3: PGMPrefetchPage. */ 2532 2559 2533 2560 /* TODO (cleanup): */ 2534 2535 2536 STAMPROFILE StatHCPrefetch;2537 2538 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING2539 STAMCOUNTER StatTrackVirgin; /**< The number of first time shadowings. */2540 STAMCOUNTER StatTrackAliased; /**< The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */2541 STAMCOUNTER StatTrackAliasedMany; /**< The number of times we're tracking using cRef2. */2542 STAMCOUNTER StatTrackAliasedLots; /**< The number of times we're hitting pages which has overflowed cRef2. */2543 STAMCOUNTER StatTrackOverflows; /**< The number of times the extent list grows to long. */2544 STAMPROFILE StatTrackDeref; /**< Profiling of SyncPageWorkerTrackDeref (expensive). */2545 # endif2546 2561 2547 2562 STAMCOUNTER StatPageHCMapTlbHits; /** Ring-3/0 page mapper TLB hits. */ … … 2561 2576 2562 2577 2563 /** GC: The number of times user page is out of sync was detected in GC. */2564 STAMCOUNTER StatGCPageOutOfSyncUser;2565 /** GC: The number of times supervisor page is out of sync was detected in GC. */2566 STAMCOUNTER StatGCPageOutOfSyncSupervisor;2567 /** GC: The number of dynamic page mapping cache hits */2568 STAMCOUNTER StatDynMapCacheMisses;2569 /** GC: The number of dynamic page mapping cache misses */2570 STAMCOUNTER StatDynMapCacheHits;2571 /** GC: The number of times pgmGCGuestPDWriteHandler() was successfully called. */2572 STAMCOUNTER StatGCGuestCR3WriteHandled;2573 /** GC: The number of times pgmGCGuestPDWriteHandler() was called and we had to fall back to the recompiler. */2574 STAMCOUNTER StatGCGuestCR3WriteUnhandled;2575 /** GC: The number of times pgmGCGuestPDWriteHandler() was called and a conflict was detected. */2576 STAMCOUNTER StatGCGuestCR3WriteConflict;2577 2578 /** GC: The number of times pgmGCGuestROMWriteHandler() was successfully called. */2579 STAMCOUNTER StatGCGuestROMWriteHandled;2580 /** GC: The number of times pgmGCGuestROMWriteHandler() was called and we had to fall back to the recompiler */2581 STAMCOUNTER StatGCGuestROMWriteUnhandled;2582 2583 /** HC: pgmr3SyncPTResolveConflict() profiling (includes the entire relocation). */2584 STAMPROFILE StatHCResolveConflict;2585 /** HC: Number of times PGMR3CheckMappingConflicts() detected a conflict. */2586 STAMCOUNTER StatHCDetectedConflicts;2587 /** HC: The total number of times pgmHCGuestPDWriteHandler() was called. */2588 STAMCOUNTER StatHCGuestPDWrite;2589 /** HC: The number of times pgmHCGuestPDWriteHandler() detected a conflict */2590 STAMCOUNTER StatHCGuestPDWriteConflict;2591 2592 2593 2578 /** GC: Profiling of the PGMGstModifyPage() body */ 2594 STAMPROFILE 2579 STAMPROFILE StatGCGstModifyPage; 2595 2580 /** HC: Profiling of the PGMGstModifyPage() body */ 2596 STAMPROFILE 2581 STAMPROFILE StatHCGstModifyPage; 2597 2582 2598 2583 STAMCOUNTER StatSynPT4kGC; -
trunk/src/VBox/VMM/PGMMap.cpp
r13019 r13087 899 899 int pgmR3SyncPTResolveConflict(PVM pVM, PPGMMAPPING pMapping, PX86PD pPDSrc, RTGCPTR GCPtrOldMapping) 900 900 { 901 STAM_PROFILE_START(&pVM->pgm.s.Stat HCResolveConflict, a);901 STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a); 902 902 903 903 /* … … 942 942 { 943 943 pgmR3MapRelocate(pVM, pMapping, GCPtrOldMapping, GCPtrNewMapping); 944 STAM_PROFILE_STOP(&pVM->pgm.s.Stat HCResolveConflict, a);944 STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a); 945 945 return VINF_SUCCESS; 946 946 } 947 947 } 948 948 949 STAM_PROFILE_STOP(&pVM->pgm.s.Stat HCResolveConflict, a);949 STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a); 950 950 AssertMsgFailed(("Failed to relocate page table mapping '%s' from %#x! (cPTs=%d)\n", pMapping->pszDesc, GCPtrOldMapping, cPTs)); 951 951 return VERR_PGM_NO_HYPERVISOR_ADDRESS; … … 963 963 int pgmR3SyncPTResolveConflictPAE(PVM pVM, PPGMMAPPING pMapping, RTGCPTR GCPtrOldMapping) 964 964 { 965 STAM_PROFILE_START(&pVM->pgm.s.Stat HCResolveConflict, a);965 STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a); 966 966 967 967 for (int iPDPTE = X86_PG_PAE_PDPE_ENTRIES - 1; iPDPTE >= 0; iPDPTE--) … … 1017 1017 { 1018 1018 pgmR3MapRelocate(pVM, pMapping, GCPtrOldMapping, GCPtrNewMapping); 1019 STAM_PROFILE_STOP(&pVM->pgm.s.Stat HCResolveConflict, a);1019 STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a); 1020 1020 return VINF_SUCCESS; 1021 1021 } 1022 1022 } 1023 1023 } 1024 STAM_PROFILE_STOP(&pVM->pgm.s.Stat HCResolveConflict, a);1024 STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a); 1025 1025 AssertMsgFailed(("Failed to relocate page table mapping '%s' from %#x! (cPTs=%d)\n", pMapping->pszDesc, GCPtrOldMapping, pMapping->cb >> X86_PD_PAE_SHIFT)); 1026 1026 return VERR_PGM_NO_HYPERVISOR_ADDRESS; … … 1066 1066 && (fRawR0 || pPD->a[iPDE + iPT].n.u1User)) 1067 1067 { 1068 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCDetectedConflicts);1068 STAM_COUNTER_INC(&pVM->pgm.s.StatR3DetectedConflicts); 1069 1069 Log(("PGMR3HasMappingConflicts: Conflict was detected at %VGv for mapping %s (32 bits)\n" 1070 1070 " iPDE=%#x iPT=%#x PDE=%VGp.\n", … … 1092 1092 && (fRawR0 || Pde.n.u1User)) 1093 1093 { 1094 STAM_COUNTER_INC(&pVM->pgm.s.Stat HCDetectedConflicts);1094 STAM_COUNTER_INC(&pVM->pgm.s.StatR3DetectedConflicts); 1095 1095 Log(("PGMR3HasMappingConflicts: Conflict was detected at %VGv for mapping %s (PAE)\n" 1096 1096 " PDE=%VGp.\n", -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r13085 r13087 425 425 VMMDECL(int) PGMPrefetchPage(PVM pVM, RTGCPTR GCPtrPage) 426 426 { 427 STAM_PROFILE_START(&pVM->pgm.s. StatHCPrefetch, a);427 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,Prefetch), a); 428 428 int rc = PGM_BTH_PFN(PrefetchPage, pVM)(pVM, (RTGCUINTPTR)GCPtrPage); 429 STAM_PROFILE_STOP(&pVM->pgm.s. StatHCPrefetch, a);429 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,Prefetch), a); 430 430 AssertMsg(rc == VINF_SUCCESS || rc == VINF_PGM_SYNC_CR3 || VBOX_FAILURE(rc), ("rc=%Vrc\n", rc)); 431 431 return rc; … … 1874 1874 void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT); 1875 1875 *ppv = pv; 1876 STAM_COUNTER_INC(&pVM->pgm.s.Stat DynMapCacheHits);1876 STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits); 1877 1877 //Log(("PGMGCDynMapHCPage: HCPhys=%VHp pv=%VGv iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache)); 1878 1878 return VINF_SUCCESS; 1879 1879 } 1880 1880 Assert(RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache) == 4); 1881 STAM_COUNTER_INC(&pVM->pgm.s.Stat DynMapCacheMisses);1881 STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheMisses); 1882 1882 1883 1883 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r13085 r13087 620 620 */ 621 621 if (uErr & X86_TRAP_PF_US) 622 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncUser);622 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser)); 623 623 else /* supervisor */ 624 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncSupervisor);624 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor)); 625 625 626 626 # if defined(LOG_ENABLED) && !defined(IN_RING0) … … 729 729 { 730 730 if (uErr & X86_TRAP_PF_US) 731 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncUser);731 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser)); 732 732 else /* supervisor */ 733 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncSupervisor);733 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor)); 734 734 735 735 … … 2996 2996 Assert(rc != VINF_EM_RAW_GUEST_TRAP); 2997 2997 if (uErr & X86_TRAP_PF_US) 2998 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncUser);2998 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser)); 2999 2999 else /* supervisor */ 3000 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageOutOfSyncSupervisor);3000 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor)); 3001 3001 3002 3002 rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0); -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r13067 r13087 1020 1020 ) 1021 1021 { 1022 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteConflict);1022 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteConflict); 1023 1023 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 1024 1024 if (rc == VINF_SUCCESS) … … 1029 1029 } 1030 1030 1031 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteHandled);1031 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled); 1032 1032 } 1033 1033 else … … 1037 1037 rc = VINF_EM_RAW_EMULATE_INSTR_PD_FAULT; 1038 1038 Log(("pgmXXGst32BitWriteHandlerCR3: returns %Rrc\n", rc)); 1039 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteUnhandled);1039 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled); 1040 1040 } 1041 1041 return rc; … … 1099 1099 } 1100 1100 1101 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteHandled);1101 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled); 1102 1102 } 1103 1103 else 1104 1104 { 1105 1105 Assert(VBOX_FAILURE(rc)); 1106 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteUnhandled);1106 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled); 1107 1107 if (rc == VERR_EM_INTERPRETER) 1108 1108 rc = VINF_EM_RAW_EMULATE_INSTR_PD_FAULT; … … 1173 1173 { 1174 1174 Log(("pgmXXGstPaeWriteHandlerPD: detected conflict iPD1=%#x iPD2=%#x\n", iPD1, iPD2)); 1175 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteConflict);1175 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteConflict); 1176 1176 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 1177 1177 return VINF_PGM_SYNC_CR3; … … 1182 1182 Assert(i < 4); 1183 1183 1184 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteHandled);1184 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled); 1185 1185 } 1186 1186 else … … 1191 1191 else 1192 1192 Log(("pgmXXGst32BitWriteHandlerCR3: returns %Rrc\n", rc)); 1193 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestCR3WriteUnhandled);1193 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled); 1194 1194 } 1195 1195 return rc; -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r13062 r13087 90 90 rc = EMInterpretDisasOne(pVM, pRegFrame, &Cpu, &cbOp); 91 91 if ( RT_SUCCESS(rc) 92 && Cpu.mode == CPUMODE_32BIT /* @todo why does this matter? */92 && Cpu.mode == CPUMODE_32BIT /** @todo why does this matter? */ 93 93 && !(Cpu.prefix & (PREFIX_REPNE | PREFIX_REP | PREFIX_SEG))) 94 94 { … … 99 99 case OP_MOV: 100 100 pRegFrame->rip += cbOp; 101 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestROMWriteHandled);101 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestROMWriteHandled); 102 102 return VINF_SUCCESS; 103 103 } … … 123 123 #endif 124 124 125 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCGuestROMWriteUnhandled);125 STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestROMWriteUnhandled); 126 126 return VINF_EM_RAW_EMULATE_INSTR; 127 127 } -
trunk/src/VBox/VMM/VMMGC/PGMGC.cpp
r13067 r13087 177 177 LogFlow(("PGMGCInvalidatePage: GCPtrPage=%VGv\n", GCPtrPage)); 178 178 179 STAM_PROFILE_START(&pVM->pgm.s.Stat GCInvalidatePage, a);179 STAM_PROFILE_START(&pVM->pgm.s.StatRCInvalidatePage, a); 180 180 181 181 /* … … 189 189 LogFlow(("PGMGCInvalidatePage: Conflict!\n")); 190 190 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 191 STAM_PROFILE_STOP(&pVM->pgm.s.Stat GCInvalidatePage, a);191 STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a); 192 192 return VINF_PGM_SYNC_CR3; 193 193 } … … 196 196 { 197 197 LogFlow(("PGMGCInvalidatePage: PGM_SYNC_MONITOR_CR3 -> reinterpret instruction in HC\n")); 198 STAM_PROFILE_STOP(&pVM->pgm.s.Stat GCInvalidatePage, a);198 STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a); 199 199 /** @todo counter for these... */ 200 200 return VINF_EM_RAW_EMULATE_INSTR; … … 210 210 rc = PGM_BTH_PFN(InvalidatePage, pVM)(pVM, GCPtrPage); 211 211 212 STAM_PROFILE_STOP(&pVM->pgm.s.Stat GCInvalidatePage, a);212 STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a); 213 213 return rc; 214 214 }
Note:
See TracChangeset
for help on using the changeset viewer.