VirtualBox

Changeset 13085 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 8, 2008 3:12:13 PM (16 years ago)
Author:
vboxsync
Message:

#1865: More PGM changes.

Location:
trunk/src/VBox/VMM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r13067 r13085  
    15051505
    15061506    /* RZ only: */
     1507    STAM_REG(pVM, &pPGM->StatRZTrap0e,                      STAMTYPE_PROFILE, "/PGM/RZ/Trap0e",                     STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMTrap0eHandler() body.");
     1508    STAM_REG(pVM, &pPGM->StatRZTrap0eTimeCheckPageFault,    STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time/CheckPageFault", STAMUNIT_TICKS_PER_CALL, "Profiling of checking for dirty/access emulation faults.");
     1509    STAM_REG(pVM, &pPGM->StatRZTrap0eTimeSyncPT,            STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time/SyncPT",         STAMUNIT_TICKS_PER_CALL, "Profiling of lazy page table syncing.");
     1510    STAM_REG(pVM, &pPGM->StatRZTrap0eTimeMapping,           STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time/Mapping",        STAMUNIT_TICKS_PER_CALL, "Profiling of checking virtual mappings.");
     1511    STAM_REG(pVM, &pPGM->StatRZTrap0eTimeOutOfSync,         STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time/OutOfSync",      STAMUNIT_TICKS_PER_CALL, "Profiling of out of sync page handling.");
     1512    STAM_REG(pVM, &pPGM->StatRZTrap0eTimeHandlers,          STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time/Handlers",       STAMUNIT_TICKS_PER_CALL, "Profiling of checking handlers.");
     1513    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2CSAM,             STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/CSAM",              STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is CSAM.");
     1514    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2DirtyAndAccessed, STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/DirtyAndAccessedBits", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is dirty and/or accessed bit emulation.");
     1515    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2GuestTrap,        STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/GuestTrap",         STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a guest trap.");
     1516    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2HndPhys,          STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/HandlerPhysical",   STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a physical handler.");
     1517    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2HndVirt,          STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/HandlerVirtual",    STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a virtual handler.");
     1518    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2HndUnhandled,     STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/HandlerUnhandled",  STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is access outside the monitored areas of a monitored page.");
     1519    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2Misc,             STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/Misc",              STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is not known.");
     1520    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2OutOfSync,        STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/OutOfSync",         STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync page.");
     1521    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2OutOfSyncHndPhys, STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/OutOfSyncHndPhys",  STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync physical handler page.");
     1522    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2OutOfSyncHndVirt, STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/OutOfSyncHndVirt",  STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync virtual handler page.");
     1523    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2OutOfSyncHndObs,  STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/OutOfSyncObsHnd",   STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an obsolete handler page.");
     1524    STAM_REG(pVM, &pPGM->StatRZTrap0eTime2SyncPT,           STAMTYPE_PROFILE, "/PGM/RZ/Trap0e/Time2/SyncPT",            STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is lazy syncing of a PT.");
     1525    STAM_REG(pVM, &pPGM->StatRZTrap0eConflicts,             STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Conflicts",               STAMUNIT_OCCURENCES,     "The number of times #PF was caused by an undetected conflict.");
     1526    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersMapping,       STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Mapping",        STAMUNIT_OCCURENCES,     "Number of traps due to access handlers in mappings.");
     1527    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersOutOfSync,     STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/OutOfSync",      STAMUNIT_OCCURENCES,     "Number of traps due to out-of-sync handled pages.");
     1528    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersPhysical,      STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Physical",       STAMUNIT_OCCURENCES,     "Number of traps due to physical access handlers.");
     1529    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersVirtual,       STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Virtual",        STAMUNIT_OCCURENCES,     "Number of traps due to virtual access handlers.");
     1530    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersVirtualByPhys, STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/VirtualByPhys",  STAMUNIT_OCCURENCES,     "Number of traps due to virtual access handlers by physical address.");
     1531    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersVirtualUnmarked,STAMTYPE_COUNTER,"/PGM/RZ/Trap0e/Handlers/VirtualUnmarked",STAMUNIT_OCCURENCES,     "Number of traps due to virtual access handlers by virtual address (without proper physical flags).");
     1532    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    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).");
    15071549
    15081550    /* R0 only: */
     
    15231565    STAM_REG(pVM, &pPGM->StatRZSyncPT,                      STAMTYPE_PROFILE, "/PGM/RZ/SyncPT",                         STAMUNIT_TICKS_PER_CALL, "Profiling of the pfnSyncPT() body.");
    15241566    STAM_REG(pVM, &pPGM->StatRZSyncPTFailed,                STAMTYPE_COUNTER, "/PGM/RZ/SyncPT/Failed",                  STAMUNIT_OCCURENCES,     "The number of times pfnSyncPT() failed.");
    1525     STAM_REG(pVM, &pPGM->StatRZSyncPagePDNAs,               STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDNAs",                  STAMUNIT_OCCURENCES,     "The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit.");
    1526     STAM_REG(pVM, &pPGM->StatRZSyncPagePDOutOfSync,         STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDOutOfSync",            STAMUNIT_OCCURENCES,     "The number of time we've encountered an out-of-sync PD in SyncPage.");
     1567    STAM_REG(pVM, &pPGM->StatRZSyncPagePDNAs,               STAMTYPE_COUNTER, "/PGM/RZ/SyncPagePDNAs",                  STAMUNIT_OCCURENCES,     "The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit.");
     1568    STAM_REG(pVM, &pPGM->StatRZSyncPagePDOutOfSync,         STAMTYPE_COUNTER, "/PGM/RZ/SyncPagePDOutOfSync",            STAMUNIT_OCCURENCES,     "The number of time we've encountered an out-of-sync PD in SyncPage.");
    15271569    STAM_REG(pVM, &pPGM->StatRZAccessedPage,                STAMTYPE_COUNTER, "/PGM/RZ/AccessedPage",               STAMUNIT_OCCURENCES,     "The number of pages marked not present for accessed bit emulation.");
    15281570    STAM_REG(pVM, &pPGM->StatRZDirtyBitTracking,            STAMTYPE_PROFILE, "/PGM/RZ/DirtyPage",                  STAMUNIT_TICKS_PER_CALL, "Profiling the dirty bit tracking in CheckPageFault().");
     
    15431585    STAM_REG(pVM, &pPGM->StatRZInvalidatePagePDOutOfSync,   STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/PDOutOfSync", STAMUNIT_OCCURENCES,     "The number of times PGMInvalidatePage() was called for an out of sync page directory.");
    15441586    STAM_REG(pVM, &pPGM->StatRZInvalidatePageSkipped,       STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/Skipped",     STAMUNIT_OCCURENCES,     "The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3.");
    1545 
     1587    STAM_REG(pVM, &pPGM->StatRZVirtHandlerSearchByPhys,     STAMTYPE_PROFILE, "/PGM/RZ/VirtHandlerSearchByPhys",    STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr.");
     1588    STAM_REG(pVM, &pPGM->StatRZPhysHandlerReset,            STAMTYPE_COUNTER, "/PGM/RZ/PhysHandlerReset",           STAMUNIT_OCCURENCES,     "The number of times PGMHandlerPhysicalReset is called.");
    15461589
    15471590    /* TODO: */
    15481591
    1549     STAM_REG(pVM, &pPGM->StatGCTrap0e,                      STAMTYPE_PROFILE, "/PGM/GC/Trap0e",                     STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGCTrap0eHandler() body.");
    1550     STAM_REG(pVM, &pPGM->StatCheckPageFault,                STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/CheckPageFault", STAMUNIT_TICKS_PER_CALL, "Profiling of checking for dirty/access emulation faults.");
    1551     STAM_REG(pVM, &pPGM->StatLazySyncPT,                    STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/SyncPT",         STAMUNIT_TICKS_PER_CALL, "Profiling of lazy page table syncing.");
    1552     STAM_REG(pVM, &pPGM->StatMapping,                       STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/Mapping",        STAMUNIT_TICKS_PER_CALL, "Profiling of checking virtual mappings.");
    1553     STAM_REG(pVM, &pPGM->StatOutOfSync,                     STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/OutOfSync",      STAMUNIT_TICKS_PER_CALL, "Profiling of out of sync page handling.");
    1554     STAM_REG(pVM, &pPGM->StatHandlers,                      STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/Handlers",       STAMUNIT_TICKS_PER_CALL, "Profiling of checking handlers.");
    1555     STAM_REG(pVM, &pPGM->StatEIPHandlers,                   STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time/EIPHandlers",    STAMUNIT_TICKS_PER_CALL, "Profiling of checking eip handlers.");
    1556     STAM_REG(pVM, &pPGM->StatTrap0eCSAM,                    STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/CSAM",          STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is CSAM.");
    1557     STAM_REG(pVM, &pPGM->StatTrap0eDirtyAndAccessedBits,    STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/DirtyAndAccessedBits", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is dirty and/or accessed bit emulation.");
    1558     STAM_REG(pVM, &pPGM->StatTrap0eGuestTrap,               STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/GuestTrap",     STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a guest trap.");
    1559     STAM_REG(pVM, &pPGM->StatTrap0eHndPhys,                 STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/HandlerPhysical", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a physical handler.");
    1560     STAM_REG(pVM, &pPGM->StatTrap0eHndVirt,                 STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/HandlerVirtual",STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is a virtual handler.");
    1561     STAM_REG(pVM, &pPGM->StatTrap0eHndUnhandled,            STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/HandlerUnhandled", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is access outside the monitored areas of a monitored page.");
    1562     STAM_REG(pVM, &pPGM->StatTrap0eMisc,                    STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/Misc",          STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is not known.");
    1563     STAM_REG(pVM, &pPGM->StatTrap0eOutOfSync,               STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/OutOfSync",     STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync page.");
    1564     STAM_REG(pVM, &pPGM->StatTrap0eOutOfSyncHndPhys,        STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/OutOfSyncHndPhys", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync physical handler page.");
    1565     STAM_REG(pVM, &pPGM->StatTrap0eOutOfSyncHndVirt,        STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/OutOfSyncHndVirt", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an out-of-sync virtual handler page.");
    1566     STAM_REG(pVM, &pPGM->StatTrap0eOutOfSyncObsHnd,         STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/OutOfSyncObsHnd", STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is an obsolete handler page.");
    1567     STAM_REG(pVM, &pPGM->StatTrap0eSyncPT,                  STAMTYPE_PROFILE, "/PGM/GC/Trap0e/Time2/SyncPT",        STAMUNIT_TICKS_PER_CALL, "Profiling of the Trap0eHandler body when the cause is lazy syncing of a PT.");
    1568 
    1569     STAM_REG(pVM, &pPGM->StatTrap0eMapHandler,              STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/Mapping",    STAMUNIT_OCCURENCES,     "Number of traps due to access handlers in mappings.");
    1570     STAM_REG(pVM, &pPGM->StatHandlersOutOfSync,             STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/OutOfSync",  STAMUNIT_OCCURENCES,     "Number of traps due to out-of-sync handled pages.");
    1571     STAM_REG(pVM, &pPGM->StatHandlersPhysical,              STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/Physical",   STAMUNIT_OCCURENCES,     "Number of traps due to physical access handlers.");
    1572     STAM_REG(pVM, &pPGM->StatHandlersVirtual,               STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/Virtual",    STAMUNIT_OCCURENCES,     "Number of traps due to virtual access handlers.");
    1573     STAM_REG(pVM, &pPGM->StatHandlersVirtualByPhys,         STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/VirtualByPhys", STAMUNIT_OCCURENCES,  "Number of traps due to virtual access handlers by physical address.");
    1574     STAM_REG(pVM, &pPGM->StatHandlersVirtualUnmarked,       STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/VirtualUnmarked", STAMUNIT_OCCURENCES,"Number of traps due to virtual access handlers by virtual address (without proper physical flags).");
    1575     STAM_REG(pVM, &pPGM->StatHandlersUnhandled,             STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/Unhandled",  STAMUNIT_OCCURENCES,     "Number of traps due to access outside range of monitored page(s).");
    1576     STAM_REG(pVM, &pPGM->StatHandlersInvalid,               STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Handlers/Invalid",    STAMUNIT_OCCURENCES,     "Number of traps due to access to invalid physical memory.");
    1577 
    1578     STAM_REG(pVM, &pPGM->StatGCTrap0eConflicts,             STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Conflicts",           STAMUNIT_OCCURENCES,     "The number of times #PF was caused by an undetected conflict.");
    1579     STAM_REG(pVM, &pPGM->StatGCTrap0eUSNotPresentRead,      STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/NPRead",         STAMUNIT_OCCURENCES,     "Number of user mode not present read page faults.");
    1580     STAM_REG(pVM, &pPGM->StatGCTrap0eUSNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/NPWrite",        STAMUNIT_OCCURENCES,     "Number of user mode not present write page faults.");
    1581     STAM_REG(pVM, &pPGM->StatGCTrap0eUSWrite,               STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/Write",          STAMUNIT_OCCURENCES,     "Number of user mode write page faults.");
    1582     STAM_REG(pVM, &pPGM->StatGCTrap0eUSReserved,            STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/Reserved",       STAMUNIT_OCCURENCES,     "Number of user mode reserved bit page faults.");
    1583     STAM_REG(pVM, &pPGM->StatGCTrap0eUSNXE,                 STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/NXE",            STAMUNIT_OCCURENCES,     "Number of user mode NXE page faults.");
    1584     STAM_REG(pVM, &pPGM->StatGCTrap0eUSRead,                STAMTYPE_COUNTER, "/PGM/GC/Trap0e/User/Read",           STAMUNIT_OCCURENCES,     "Number of user mode read page faults.");
    1585 
    1586     STAM_REG(pVM, &pPGM->StatGCTrap0eSVNotPresentRead,      STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Supervisor/NPRead",   STAMUNIT_OCCURENCES,     "Number of supervisor mode not present read page faults.");
    1587     STAM_REG(pVM, &pPGM->StatGCTrap0eSVNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Supervisor/NPWrite",  STAMUNIT_OCCURENCES,     "Number of supervisor mode not present write page faults.");
    1588     STAM_REG(pVM, &pPGM->StatGCTrap0eSVWrite,               STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Supervisor/Write",    STAMUNIT_OCCURENCES,     "Number of supervisor mode write page faults.");
    1589     STAM_REG(pVM, &pPGM->StatGCTrap0eSVReserved,            STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Supervisor/Reserved", STAMUNIT_OCCURENCES,     "Number of supervisor mode reserved bit page faults.");
    1590     STAM_REG(pVM, &pPGM->StatGCTrap0eSNXE,                  STAMTYPE_COUNTER, "/PGM/GC/Trap0e/Supervisor/NXE",      STAMUNIT_OCCURENCES,     "Number of supervisor mode NXE page faults.");
    1591     STAM_REG(pVM, &pPGM->StatGCTrap0eUnhandled,             STAMTYPE_COUNTER, "/PGM/GC/Trap0e/GuestPF/Unhandled",   STAMUNIT_OCCURENCES,     "Number of guest real page faults.");
    1592     STAM_REG(pVM, &pPGM->StatGCTrap0eMap,                   STAMTYPE_COUNTER, "/PGM/GC/Trap0e/GuestPF/Map",         STAMUNIT_OCCURENCES,     "Number of guest page faults due to map accesses.");
    1593 
    1594     STAM_REG(pVM, &pPGM->StatTrap0eWPEmulGC,                STAMTYPE_COUNTER, "/PGM/GC/Trap0e/WP/InGC",             STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation.");
    1595     STAM_REG(pVM, &pPGM->StatTrap0eWPEmulR3,                STAMTYPE_COUNTER, "/PGM/GC/Trap0e/WP/ToR3",             STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation (forward to R3 for emulation).");
    15961592
    15971593    STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteHandled,        STAMTYPE_COUNTER, "/PGM/GC/CR3WriteInt",                STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 change was successfully handled.");
     
    16151611    STAM_REG(pVM, &pPGM->StatHCPrefetch,                    STAMTYPE_PROFILE, "/PGM/HC/Prefetch",                   STAMUNIT_TICKS_PER_CALL, "PGMR3PrefetchPage profiling.");
    16161612
    1617     STAM_REG(pVM, &pPGM->StatR3SyncPT,                      STAMTYPE_PROFILE, "/PGM/R3/SyncPT",                     STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body.");
    16181613
    16191614
     
    16251620
    16261621
    1627     STAM_REG(pVM, &pPGM->StatVirtHandleSearchByPhysGC,      STAMTYPE_PROFILE, "/PGM/VirtHandler/SearchByPhys/GC",   STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr in GC.");
    1628     STAM_REG(pVM, &pPGM->StatVirtHandleSearchByPhysHC,      STAMTYPE_PROFILE, "/PGM/VirtHandler/SearchByPhys/HC",   STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr in HC.");
    1629     STAM_REG(pVM, &pPGM->StatHandlePhysicalReset,           STAMTYPE_COUNTER, "/PGM/HC/HandlerPhysicalReset",       STAMUNIT_OCCURENCES,     "The number of times PGMR3HandlerPhysicalReset is called.");
    1630 
    16311622    STAM_REG(pVM, &pPGM->StatHCGstModifyPage,               STAMTYPE_PROFILE, "/PGM/HC/GstModifyPage",              STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGstModifyPage() body.");
    16321623    STAM_REG(pVM, &pPGM->StatGCGstModifyPage,               STAMTYPE_PROFILE, "/PGM/GC/GstModifyPage",              STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGstModifyPage() body.");
    16331624
     1625    STAM_REG(pVM, &pPGM->StatR3SyncPT,                      STAMTYPE_PROFILE, "/PGM/R3/SyncPT",                     STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body.");
    16341626    STAM_REG(pVM, &pPGM->StatSynPT4kGC,                     STAMTYPE_COUNTER, "/PGM/GC/SyncPT/4k",                  STAMUNIT_OCCURENCES,     "Nr of 4k PT syncs");
    16351627    STAM_REG(pVM, &pPGM->StatSynPT4kHC,                     STAMTYPE_COUNTER, "/PGM/HC/SyncPT/4k",                  STAMUNIT_OCCURENCES,     "Nr of 4k PT syncs");
     
    16691661
    16701662        RTStrPrintf(szName, sizeof(szName), "/PGM/GC/PD/Trap0e/%04X", i);
    1671         int rc = STAMR3Register(pVM, &pPGM->StatGCTrap0ePD[i], STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, "The number of traps in page directory n.");
     1663        int rc = STAMR3Register(pVM, &pPGM->StatRZTrap0ePD[i], STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, "The number of traps in page directory n.");
    16721664        AssertRC(rc);
    16731665
  • trunk/src/VBox/VMM/PGMInternal.h

    r13067 r13085  
    10061006    /** The flags (PGMPHYS_ROM_FLAG_*). */
    10071007    uint32_t                        fFlags;
    1008      /**< Alignment padding ensuring that aPages is sizeof(PGMROMPAGE) aligned. */
     1008    /** Alignment padding ensuring that aPages is sizeof(PGMROMPAGE) aligned. */
    10091009    uint32_t                        au32Alignemnt[HC_ARCH_BITS == 32 ? 7 : 3];
    10101010    /** Pointer to the original bits when PGMPHYS_ROM_FLAG_PERMANENT_BINARY was specified.
     
    10501050     *          PCI devices with matching MMIO region numbers on a single device. */
    10511051    uint8_t                             iRegion;
    1052     /**< Alignment padding for putting the ram range on a PGMPAGE alignment boundrary. */
     1052    /** Alignment padding for putting the ram range on a PGMPAGE alignment boundrary. */
    10531053    uint8_t                             abAlignemnt[HC_ARCH_BITS == 32 ? 1 : 5];
    10541054    /** The associated RAM range. */
     
    24122412
    24132413    /* RZ only: */
     2414    STAMPROFILE StatRZTrap0e;                       /**< RC/R0: PGMTrap0eHandler() profiling. */
     2415    STAMPROFILE StatRZTrap0eTimeCheckPageFault;
     2416    STAMPROFILE StatRZTrap0eTimeSyncPT;
     2417    STAMPROFILE StatRZTrap0eTimeMapping;
     2418    STAMPROFILE StatRZTrap0eTimeOutOfSync;
     2419    STAMPROFILE StatRZTrap0eTimeHandlers;
     2420    STAMPROFILE StatRZTrap0eTime2CSAM;              /**< RC/R0: Profiling of the Trap0eHandler body when the cause is CSAM. */
     2421    STAMPROFILE StatRZTrap0eTime2DirtyAndAccessed;  /**< RC/R0: Profiling of the Trap0eHandler body when the cause is dirty and/or accessed bit emulation. */
     2422    STAMPROFILE StatRZTrap0eTime2GuestTrap;         /**< RC/R0: Profiling of the Trap0eHandler body when the cause is a guest trap. */
     2423    STAMPROFILE StatRZTrap0eTime2HndPhys;           /**< RC/R0: Profiling of the Trap0eHandler body when the cause is a physical handler. */
     2424    STAMPROFILE StatRZTrap0eTime2HndVirt;           /**< RC/R0: Profiling of the Trap0eHandler body when the cause is a virtual handler. */
     2425    STAMPROFILE StatRZTrap0eTime2HndUnhandled;      /**< RC/R0: Profiling of the Trap0eHandler body when the cause is access outside the monitored areas of a monitored page. */
     2426    STAMPROFILE StatRZTrap0eTime2Misc;              /**< RC/R0: Profiling of the Trap0eHandler body when the cause is not known. */
     2427    STAMPROFILE StatRZTrap0eTime2OutOfSync;         /**< RC/R0: Profiling of the Trap0eHandler body when the cause is an out-of-sync page. */
     2428    STAMPROFILE StatRZTrap0eTime2OutOfSyncHndPhys;  /**< RC/R0: Profiling of the Trap0eHandler body when the cause is an out-of-sync physical handler page. */
     2429    STAMPROFILE StatRZTrap0eTime2OutOfSyncHndVirt;  /**< RC/R0: Profiling of the Trap0eHandler body when the cause is an out-of-sync virtual handler page. */
     2430    STAMPROFILE StatRZTrap0eTime2OutOfSyncHndObs;   /**< RC/R0: Profiling of the Trap0eHandler body when the cause is an obsolete handler page. */
     2431    STAMPROFILE StatRZTrap0eTime2SyncPT;            /**< RC/R0: Profiling of the Trap0eHandler body when the cause is lazy syncing of a PT. */
     2432    STAMCOUNTER StatRZTrap0eConflicts;              /**< RC/R0: The number of times \#PF was caused by an undetected conflict. */
     2433    STAMCOUNTER StatRZTrap0eHandlersMapping;        /**< RC/R0: Number of traps due to access handlers in mappings. */
     2434    STAMCOUNTER StatRZTrap0eHandlersOutOfSync;      /**< RC/R0: Number of out-of-sync handled pages. */
     2435    STAMCOUNTER StatRZTrap0eHandlersPhysical;       /**< RC/R0: Number of traps due to physical access handlers. */
     2436    STAMCOUNTER StatRZTrap0eHandlersVirtual;        /**< RC/R0: Number of traps due to virtual access handlers. */
     2437    STAMCOUNTER StatRZTrap0eHandlersVirtualByPhys;  /**< RC/R0: Number of traps due to virtual access handlers found by physical address. */
     2438    STAMCOUNTER StatRZTrap0eHandlersVirtualUnmarked;/**< RC/R0: Number of traps due to virtual access handlers found by virtual address (without proper physical flags). */
     2439    STAMCOUNTER StatRZTrap0eHandlersUnhandled;      /**< RC/R0: Number of traps due to access outside range of monitored page(s). */
     2440    STAMCOUNTER StatRZTrap0eHandlersInvalid;        /**< RC/R0: Number of traps due to access to invalid physical memory. */
     2441    STAMCOUNTER StatRZTrap0eUSNotPresentRead;       /**< RC/R0: #PF err kind */
     2442    STAMCOUNTER StatRZTrap0eUSNotPresentWrite;      /**< RC/R0: #PF err kind */
     2443    STAMCOUNTER StatRZTrap0eUSWrite;                /**< RC/R0: #PF err kind */
     2444    STAMCOUNTER StatRZTrap0eUSReserved;             /**< RC/R0: #PF err kind */
     2445    STAMCOUNTER StatRZTrap0eUSNXE;                  /**< RC/R0: #PF err kind */
     2446    STAMCOUNTER StatRZTrap0eUSRead;                 /**< RC/R0: #PF err kind */
     2447    STAMCOUNTER StatRZTrap0eSVNotPresentRead;       /**< RC/R0: #PF err kind */
     2448    STAMCOUNTER StatRZTrap0eSVNotPresentWrite;      /**< RC/R0: #PF err kind */
     2449    STAMCOUNTER StatRZTrap0eSVWrite;                /**< RC/R0: #PF err kind */
     2450    STAMCOUNTER StatRZTrap0eSVReserved;             /**< RC/R0: #PF err kind */
     2451    STAMCOUNTER StatRZTrap0eSNXE;                   /**< RC/R0: #PF err kind */
     2452    STAMCOUNTER StatRZTrap0eGuestPF;                /**< RC/R0: Real guest #PF. */
     2453    STAMCOUNTER StatRZTrap0eGuestPFMapping;         /**< RC/R0: Real guest #PF to HMA or other mapping. */
     2454    STAMCOUNTER StatRZTrap0eWPEmulInRZ;             /**< RC/R0: WP=0 virtualization trap, handled. */
     2455    STAMCOUNTER StatRZTrap0eWPEmulToR3;             /**< RC/R0: WP=0 virtualization trap, chickened out. */
     2456
    24142457
    24152458    /* RZ & R3: */
     
    24482491    STAMCOUNTER StatRZInvalidatePagePDOutOfSync;    /**< RC/R0: The number of times PGMInvalidatePage() was called for an out of sync page directory. */
    24492492    STAMCOUNTER StatRZInvalidatePageSkipped;        /**< RC/R0: The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */
     2493    STAMPROFILE StatRZVirtHandlerSearchByPhys;      /**< RC/R0: Profiling of pgmHandlerVirtualFindByPhysAddr. */
     2494    STAMCOUNTER StatRZPhysHandlerReset;             /**< RC/R0: The number of times PGMHandlerPhysicalReset is called. */
    24502495
    24512496    STAMPROFILE StatR3SyncCR3;                      /**< R3: PGMSyncCR3() profiling. */
     
    24832528    STAMCOUNTER StatR3InvalidatePagePDOutOfSync;    /**< R3: The number of times PGMInvalidatePage() was called for an out of sync page directory. */
    24842529    STAMCOUNTER StatR3InvalidatePageSkipped;        /**< R3: The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */
     2530    STAMPROFILE StatR3VirtHandlerSearchByPhys;      /**< R3: Profiling of pgmHandlerVirtualFindByPhysAddr. */
     2531    STAMCOUNTER StatR3PhysHandlerReset;             /**< R3: The number of times PGMHandlerPhysicalReset is called. */
    24852532
    24862533    /* TODO (cleanup):  */
    24872534
    2488     /** GC: Profiling of pgmHandlerVirtualFindByPhysAddr. */
    2489     STAMPROFILE StatVirtHandleSearchByPhysGC;
    2490     /** HC: Profiling of pgmHandlerVirtualFindByPhysAddr. */
    2491     STAMPROFILE StatVirtHandleSearchByPhysHC;
    2492     /** HC: The number of times PGMR3HandlerPhysicalReset is called. */
    2493     STAMCOUNTER StatHandlePhysicalReset;
    2494 
    2495     STAMPROFILE StatCheckPageFault;
    2496     STAMPROFILE StatLazySyncPT;
    2497     STAMPROFILE StatMapping;
    2498     STAMPROFILE StatOutOfSync;
    2499     STAMPROFILE StatHandlers;
    2500     STAMPROFILE StatEIPHandlers;
     2535
    25012536    STAMPROFILE StatHCPrefetch;
    25022537
     
    25212556    STAMCOUNTER StatDynRamGrow;                     /** Nr of pgmr3PhysGrowRange calls. */
    25222557
    2523     STAMCOUNTER StatGCTrap0ePD[X86_PG_ENTRIES];
     2558    STAMCOUNTER StatRZTrap0ePD[X86_PG_ENTRIES];
    25242559    STAMCOUNTER StatGCSyncPtPD[X86_PG_ENTRIES];
    25252560    STAMCOUNTER StatGCSyncPagePD[X86_PG_ENTRIES];
    25262561
    2527     STAMPROFILE     StatGCTrap0e;                       /**< GC: PGMGCTrap0eHandler() profiling. */
    2528     STAMPROFILE     StatTrap0eCSAM;                     /**< Profiling of the Trap0eHandler body when the cause is CSAM. */
    2529     STAMPROFILE     StatTrap0eDirtyAndAccessedBits;     /**< Profiling of the Trap0eHandler body when the cause is dirty and/or accessed bit emulation. */
    2530     STAMPROFILE     StatTrap0eGuestTrap;                /**< Profiling of the Trap0eHandler body when the cause is a guest trap. */
    2531     STAMPROFILE     StatTrap0eHndPhys;                  /**< Profiling of the Trap0eHandler body when the cause is a physical handler. */
    2532     STAMPROFILE     StatTrap0eHndVirt;                  /**< Profiling of the Trap0eHandler body when the cause is a virtual handler. */
    2533     STAMPROFILE     StatTrap0eHndUnhandled;             /**< Profiling of the Trap0eHandler body when the cause is access outside the monitored areas of a monitored page. */
    2534     STAMPROFILE     StatTrap0eMisc;                     /**< Profiling of the Trap0eHandler body when the cause is not known. */
    2535     STAMPROFILE     StatTrap0eOutOfSync;                /**< Profiling of the Trap0eHandler body when the cause is an out-of-sync page. */
    2536     STAMPROFILE     StatTrap0eOutOfSyncHndPhys;         /**< Profiling of the Trap0eHandler body when the cause is an out-of-sync physical handler page. */
    2537     STAMPROFILE     StatTrap0eOutOfSyncHndVirt;         /**< Profiling of the Trap0eHandler body when the cause is an out-of-sync virtual handler page. */
    2538     STAMPROFILE     StatTrap0eOutOfSyncObsHnd;          /**< Profiling of the Trap0eHandler body when the cause is an obsolete handler page. */
    2539     STAMPROFILE     StatTrap0eSyncPT;                   /**< Profiling of the Trap0eHandler body when the cause is lazy syncing of a PT. */
    2540 
    2541     STAMCOUNTER     StatTrap0eMapHandler;               /**< Number of traps due to access handlers in mappings. */
    2542     STAMCOUNTER     StatGCTrap0eConflicts;              /**< GC: The number of times \#PF was caused by an undetected conflict. */
    2543 
    2544     STAMCOUNTER     StatGCTrap0eUSNotPresentRead;
    2545     STAMCOUNTER     StatGCTrap0eUSNotPresentWrite;
    2546     STAMCOUNTER     StatGCTrap0eUSWrite;
    2547     STAMCOUNTER     StatGCTrap0eUSReserved;
    2548     STAMCOUNTER     StatGCTrap0eUSNXE;
    2549     STAMCOUNTER     StatGCTrap0eUSRead;
    2550 
    2551     STAMCOUNTER     StatGCTrap0eSVNotPresentRead;
    2552     STAMCOUNTER     StatGCTrap0eSVNotPresentWrite;
    2553     STAMCOUNTER     StatGCTrap0eSVWrite;
    2554     STAMCOUNTER     StatGCTrap0eSVReserved;
    2555     STAMCOUNTER     StatGCTrap0eSNXE;
    2556 
    2557     STAMCOUNTER     StatTrap0eWPEmulGC;
    2558     STAMCOUNTER     StatTrap0eWPEmulR3;
    2559 
    2560     STAMCOUNTER     StatGCTrap0eUnhandled;
    2561     STAMCOUNTER     StatGCTrap0eMap;
    25622562
    25632563    /** GC: The number of times user page is out of sync was detected in GC. */
     
    25752575    /** GC: The number of times pgmGCGuestPDWriteHandler() was called and a conflict was detected. */
    25762576    STAMCOUNTER     StatGCGuestCR3WriteConflict;
    2577     /** GC: Number of out-of-sync handled pages. */
    2578     STAMCOUNTER     StatHandlersOutOfSync;
    2579     /** GC: Number of traps due to physical access handlers. */
    2580     STAMCOUNTER     StatHandlersPhysical;
    2581     /** GC: Number of traps due to virtual access handlers. */
    2582     STAMCOUNTER     StatHandlersVirtual;
    2583     /** GC: Number of traps due to virtual access handlers found by physical address. */
    2584     STAMCOUNTER     StatHandlersVirtualByPhys;
    2585     /** GC: Number of traps due to virtual access handlers found by virtual address (without proper physical flags). */
    2586     STAMCOUNTER     StatHandlersVirtualUnmarked;
    2587     /** GC: Number of traps due to access outside range of monitored page(s). */
    2588     STAMCOUNTER     StatHandlersUnhandled;
    2589     /** GC: Number of traps due to access to invalid physical memory. */
    2590     STAMCOUNTER     StatHandlersInvalid;
    25912577
    25922578    /** GC: The number of times pgmGCGuestROMWriteHandler() was successfully called. */
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r13073 r13085  
    353353{
    354354    LogFlow(("PGMTrap0eHandler: uErr=%RGu pvFault=%VGv eip=%VGv\n", uErr, pvFault, pRegFrame->rip));
    355     STAM_PROFILE_START(&pVM->pgm.s.StatGCTrap0e, a);
     355    STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0e, a);
    356356    STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } );
    357357
     
    366366        {
    367367            if (uErr & X86_TRAP_PF_RW)
    368                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNotPresentWrite);
     368                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentWrite);
    369369            else
    370                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNotPresentRead);
     370                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentRead);
    371371        }
    372372        else if (uErr & X86_TRAP_PF_RW)
    373             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSWrite);
     373            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSWrite);
    374374        else if (uErr & X86_TRAP_PF_RSVD)
    375             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSReserved);
     375            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSReserved);
    376376        else if (uErr & X86_TRAP_PF_ID)
    377             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNXE);
     377            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNXE);
    378378        else
    379             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSRead);
     379            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSRead);
    380380    }
    381381    else
     
    384384        {
    385385            if (uErr & X86_TRAP_PF_RW)
    386                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVNotPresentWrite);
     386                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentWrite);
    387387            else
    388                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVNotPresentRead);
     388                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentRead);
    389389        }
    390390        else if (uErr & X86_TRAP_PF_RW)
    391             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVWrite);
     391            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVWrite);
    392392        else if (uErr & X86_TRAP_PF_ID)
    393             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSNXE);
     393            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSNXE);
    394394        else if (uErr & X86_TRAP_PF_RSVD)
    395             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVReserved);
     395            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVReserved);
    396396    }
    397397#endif
     
    404404        rc = VINF_SUCCESS;
    405405    STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution))
    406                     pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; });
    407     STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a);
     406                    pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2Misc; });
     407    STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatRZTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a);
    408408    return rc;
    409409}
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r13067 r13085  
    128128        LogFlow(("Trap0eHandler: guest iPDSrc=%u not present CR3=%VGp\n", iPDSrc, CPUMGetGuestCR3(pVM) & X86_CR3_PAGE_MASK));
    129129#    endif
    130         STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eGuestTrap; });
     130        STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2GuestTrap; });
    131131        TRPMSetErrorCode(pVM, uErr);
    132132        return VINF_EM_RAW_GUEST_TRAP;
     
    188188     * tracking, or this page fault is a genuine one, then return immediately.
    189189     */
    190     STAM_PROFILE_START(&pVM->pgm.s.StatCheckPageFault, e);
     190    STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeCheckPageFault, e);
    191191    rc = PGM_BTH_NAME(CheckPageFault)(pVM, uErr, &pPDDst->a[iPDDst], &pPDSrc->a[iPDSrc], (RTGCUINTPTR)pvFault);
    192     STAM_PROFILE_STOP(&pVM->pgm.s.StatCheckPageFault, e);
     192    STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeCheckPageFault, e);
    193193    if (    rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT
    194194        ||  rc == VINF_EM_RAW_GUEST_TRAP)
    195195    {
    196196        STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution)
    197                      = rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? &pVM->pgm.s.StatTrap0eDirtyAndAccessedBits : &pVM->pgm.s.StatTrap0eGuestTrap; });
     197                     = rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? &pVM->pgm.s.StatRZTrap0eTime2DirtyAndAccessed : &pVM->pgm.s.StatRZTrap0eTime2GuestTrap; });
    198198        LogBird(("Trap0eHandler: returns %s\n", rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? "VINF_SUCCESS" : "VINF_EM_RAW_GUEST_TRAP"));
    199199        return rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? VINF_SUCCESS : rc;
    200200    }
    201201
    202     STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0ePD[iPDSrc]);
     202    STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0ePD[iPDSrc]);
    203203#  endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */
    204204
     
    230230
    231231    {
    232         STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eSyncPT; });
    233         STAM_PROFILE_START(&pVM->pgm.s.StatLazySyncPT, f);
     232        STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2SyncPT; });
     233        STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f);
    234234        LogFlow(("=>SyncPT %04x = %08x\n", iPDSrc, PdeSrc.au32[0]));
    235235        rc = PGM_BTH_NAME(SyncPT)(pVM, iPDSrc, pPDSrc, (RTGCUINTPTR)pvFault);
    236236        if (VBOX_SUCCESS(rc))
    237237        {
    238             STAM_PROFILE_STOP(&pVM->pgm.s.StatLazySyncPT, f);
     238            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f);
    239239            return rc;
    240240        }
    241241        Log(("SyncPT: %d failed!! rc=%d\n", iPDSrc, rc));
    242242        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); /** @todo no need to do global sync, right? */
    243         STAM_PROFILE_STOP(&pVM->pgm.s.StatLazySyncPT, f);
     243        STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f);
    244244        return VINF_PGM_SYNC_CR3;
    245245    }
     
    255255    if (pgmMapAreMappingsEnabled(&pVM->pgm.s))
    256256    {
    257         STAM_PROFILE_START(&pVM->pgm.s.StatMapping, a);
     257        STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeMapping, a);
    258258        PPGMMAPPING pMapping = pVM->pgm.s.CTX_SUFF(pMappings);
    259259        for ( ; pMapping; pMapping = pMapping->CTX_SUFF(pNext))
     
    272272                        if (pPDSrc->a[iPDSrc + iPT].n.u1Present)
    273273                        {
    274                             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eConflicts);
     274                            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eConflicts);
    275275                            Log(("Trap0e: Detected Conflict %VGv-%VGv\n", pMapping->GCPtr, pMapping->GCPtrLast));
    276276                            VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); /** @todo no need to do global sync,right? */
    277                             STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a);
     277                            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a);
    278278                            return VINF_PGM_SYNC_CR3;
    279279                        }
     
    296296                    rc = VINF_EM_RAW_EMULATE_INSTR; /* can't happen with VMX */
    297297#   endif
    298                     STAM_COUNTER_INC(&pVM->pgm.s.StatTrap0eMapHandler);
    299                     STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a);
     298                    STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersMapping);
     299                    STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a);
    300300                    return rc;
    301301                }
     
    305305                 */
    306306                TRPMSetErrorCode(pVM, uErr & ~X86_TRAP_PF_P);
    307                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eMap);
     307                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eGuestPFMapping);
    308308                LogFlow(("PGM: Mapping access -> route trap to recompiler!\n"));
    309                 STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a);
     309                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a);
    310310                return VINF_EM_RAW_GUEST_TRAP;
    311311            }
    312312        }
    313         STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a);
     313        STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a);
    314314    } /* pgmAreMappingsEnabled(&pVM->pgm.s) */
    315315#  endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */
     
    358358        if (GCPhys != NIL_RTGCPHYS)
    359359        {
    360             STAM_PROFILE_START(&pVM->pgm.s.StatHandlers, b);
     360            STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
    361361
    362362            PPGMPAGE pPage;
     
    392392                                {
    393393                                    AssertRC(rc);
    394                                     STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync);
    395                                     STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    396                                     STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; });
     394                                    STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersOutOfSync);
     395                                    STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     396                                    STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSyncHndPhys; });
    397397                                    return rc;
    398398                                }
     
    414414# endif
    415415                                rc = VINF_EM_RAW_EMULATE_INSTR;
    416                             STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersPhysical);
    417                             STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    418                             STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndPhys; });
     416                            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersPhysical);
     417                            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     418                            STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndPhys; });
    419419                            return rc;
    420420                        }
     
    438438                            {
    439439                                AssertRC(rc);
    440                                 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync);
    441                                 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    442                                 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndVirt; });
     440                                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersOutOfSync);
     441                                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     442                                STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSyncHndVirt; });
    443443                                return rc;
    444444                            }
     
    475475                                rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */
    476476#   endif
    477                                 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtual);
    478                                 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    479                                 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });
     477                                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersVirtual);
     478                                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     479                                STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndVirt; });
    480480                                return rc;
    481481                            }
     
    504504                                rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */
    505505#   endif
    506                                 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtualByPhys);
    507                                 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    508                                 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });
     506                                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersVirtualByPhys);
     507                                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     508                                STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndVirt; });
    509509                                return rc;
    510510                            }
     
    521521                     * write access handlers. Restart the instruction if it wasn't a write access.
    522522                     */
    523                     STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersUnhandled);
     523                    STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersUnhandled);
    524524
    525525                    if (    !PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)
     
    532532                        {
    533533                            AssertRC(rc);
    534                             STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync);
    535                             STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    536                             STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; });
     534                            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersOutOfSync);
     535                            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     536                            STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSyncHndPhys; });
    537537                            return rc;
    538538                        }
     
    547547                             PGM_PAGE_HAS_ANY_PHYSICAL_HANDLERS(pPage) ? " phys" : "",
    548548                             PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(pPage)  ? " virt" : ""));
    549                     STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    550                     STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndUnhandled; });
     549                    STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     550                    STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndUnhandled; });
    551551                    return rc;
    552552                } /* if any kind of handler */
     
    582582                            rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */
    583583#   endif
    584                             STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtualUnmarked);
    585                             STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
    586                             STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });
     584                            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersVirtualUnmarked);
     585                            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
     586                            STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndVirt; });
    587587                            return rc;
    588588                        }
     
    597597                 */
    598598                LogFlow(("pgmPhysGetPageEx %VGp failed with %Vrc\n", GCPhys, rc));
    599                 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersInvalid);
    600                 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
     599                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersInvalid);
     600                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
    601601                return VINF_EM_RAW_EMULATE_INSTR;
    602602            }
    603603
    604             STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b);
     604            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b);
    605605
    606606#  ifdef PGM_OUT_OF_SYNC_IN_GC
     
    610610             * Check it for page out-of-sync situation.
    611611             */
    612             STAM_PROFILE_START(&pVM->pgm.s.StatOutOfSync, c);
     612            STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c);
    613613
    614614            if (!(uErr & X86_TRAP_PF_P))
     
    663663                                AssertRC(rc2);
    664664
    665                                 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c);
    666                                 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eCSAM; });
     665                                STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c);
     666                                STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2CSAM; });
    667667                                return rc;
    668668                            }
     
    714714                {
    715715                    /* The page was successfully synced, return to the guest. */
    716                     STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c);
    717                     STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSync; });
     716                    STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c);
     717                    STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSync; });
    718718                    return VINF_SUCCESS;
    719719                }
     
    754754                        AssertMsg(VBOX_SUCCESS(rc) && fPageShw & X86_PTE_RW, ("rc=%Vrc fPageShw=%VX64\n", rc, fPageShw));
    755755#   endif /* VBOX_STRICT */
    756                         STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c);
    757                         STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncObsHnd; });
     756                        STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c);
     757                        STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSyncHndObs; });
    758758                        return VINF_SUCCESS;
    759759                    }
     
    761761                    /* Check to see if we need to emulate the instruction as X86_CR0_WP has been cleared. */
    762762                    if (    CPUMGetGuestCPL(pVM, pRegFrame) == 0
    763                         &&  ((CPUMGetGuestCR0(pVM) & (X86_CR0_WP|X86_CR0_PG)) == X86_CR0_PG)
     763                        &&  ((CPUMGetGuestCR0(pVM) & (X86_CR0_WP | X86_CR0_PG)) == X86_CR0_PG)
    764764                        &&  (uErr & (X86_TRAP_PF_RW | X86_TRAP_PF_P)) == (X86_TRAP_PF_RW | X86_TRAP_PF_P))
    765765                    {
     
    771771                            rc = PGMInterpretInstruction(pVM, pRegFrame, pvFault);
    772772                            if (VBOX_SUCCESS(rc))
    773                                 STAM_COUNTER_INC(&pVM->pgm.s.StatTrap0eWPEmulGC);
     773                                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eWPEmulInRZ);
    774774                            else
    775                                 STAM_COUNTER_INC(&pVM->pgm.s.StatTrap0eWPEmulR3);
     775                                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eWPEmulToR3);
    776776                            return rc;
    777777                        }
    778                         else
    779                             AssertMsgFailed(("Unexpected r/w page %x flag=%x\n", pvFault, (uint32_t)fPageGst));
     778                        AssertMsgFailed(("Unexpected r/w page %RGv flag=%x rc=%Rrc\n", pvFault, (uint32_t)fPageGst, rc));
    780779                    }
    781 
    782780                }
    783781
     
    813811#   endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */
    814812            }
    815             STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c);
     813            STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c);
    816814#  endif /* PGM_OUT_OF_SYNC_IN_GC */
    817815        }
     
    841839     */
    842840    LogFlow(("PGM: Unhandled #PF -> route trap to recompiler!\n"));
    843     STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUnhandled);
     841    STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eGuestPF);
    844842    return VINF_EM_RAW_GUEST_TRAP;
    845843#  else
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r13062 r13085  
    807807                 * Set the flags and flush shadow PT entries.
    808808                 */
    809                 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlePhysicalReset);
     809                STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PhysHandlerReset));
    810810                PPGMRAMRANGE pRam = pgmPhysGetRange(&pVM->pgm.s, GCPhys);
    811811                Assert(pRam);
     
    997997int pgmHandlerVirtualFindByPhysAddr(PVM pVM, RTGCPHYS GCPhys, PPGMVIRTHANDLER *ppVirt, unsigned *piPage)
    998998{
    999     STAM_PROFILE_START(CTXSUFF(&pVM->pgm.s.StatVirtHandleSearchByPhys), a);
     999    STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a);
    10001000    Assert(ppVirt);
    10011001
     
    10121012
    10131013        LogFlow(("PHYS2VIRT: found match for %RGp -> %RGv *piPage=%#x\n", GCPhys, (*ppVirt)->Core.Key, *piPage));
    1014         STAM_PROFILE_STOP(CTXSUFF(&pVM->pgm.s.StatVirtHandleSearchByPhys), a);
     1014        STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a);
    10151015        return VINF_SUCCESS;
    10161016    }
    10171017
    10181018    *ppVirt = NULL;
    1019     STAM_PROFILE_STOP(CTXSUFF(&pVM->pgm.s.StatVirtHandleSearchByPhys), a);
     1019    STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a);
    10201020    return VERR_PGM_HANDLER_NOT_FOUND;
    10211021}
  • trunk/src/VBox/VMM/VMMR0/PGMR0.cpp

    r13067 r13085  
    8383
    8484    LogFlow(("PGMTrap0eHandler: uErr=%#x pvFault=%VGp eip=%VGv\n", uErr, pvFault, pRegFrame->rip));
    85     STAM_PROFILE_START(&pVM->pgm.s.StatGCTrap0e, a);
     85    STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0e, a);
    8686    STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } );
    8787
     
    9898        {
    9999            if (uErr & X86_TRAP_PF_RW)
    100                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNotPresentWrite);
     100                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentWrite);
    101101            else
    102                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNotPresentRead);
     102                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentRead);
    103103        }
    104104        else if (uErr & X86_TRAP_PF_RW)
    105             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSWrite);
     105            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSWrite);
    106106        else if (uErr & X86_TRAP_PF_RSVD)
    107             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSReserved);
     107            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSReserved);
    108108        else if (uErr & X86_TRAP_PF_ID)
    109             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSNXE);
     109            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNXE);
    110110        else
    111             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUSRead);
     111            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSRead);
    112112    }
    113113    else
     
    116116        {
    117117            if (uErr & X86_TRAP_PF_RW)
    118                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVNotPresentWrite);
     118                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentWrite);
    119119            else
    120                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVNotPresentRead);
     120                STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentRead);
    121121        }
    122122        else if (uErr & X86_TRAP_PF_RW)
    123             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVWrite);
     123            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVWrite);
    124124        else if (uErr & X86_TRAP_PF_ID)
    125             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSNXE);
     125            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSNXE);
    126126        else if (uErr & X86_TRAP_PF_RSVD)
    127             STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eSVReserved);
     127            STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVReserved);
    128128    }
    129129#endif
     
    159159        rc = VINF_SUCCESS;
    160160    STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution))
    161                     pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; });
    162     STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a);
     161                    pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2Misc; });
     162    STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatRZTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a);
    163163    return rc;
    164164}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette