Changeset 13085 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 8, 2008 3:12:13 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r13067 r13085 1505 1505 1506 1506 /* 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)."); 1507 1549 1508 1550 /* R0 only: */ … … 1523 1565 STAM_REG(pVM, &pPGM->StatRZSyncPT, STAMTYPE_PROFILE, "/PGM/RZ/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the pfnSyncPT() body."); 1524 1566 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."); 1527 1569 STAM_REG(pVM, &pPGM->StatRZAccessedPage, STAMTYPE_COUNTER, "/PGM/RZ/AccessedPage", STAMUNIT_OCCURENCES, "The number of pages marked not present for accessed bit emulation."); 1528 1570 STAM_REG(pVM, &pPGM->StatRZDirtyBitTracking, STAMTYPE_PROFILE, "/PGM/RZ/DirtyPage", STAMUNIT_TICKS_PER_CALL, "Profiling the dirty bit tracking in CheckPageFault()."); … … 1543 1585 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."); 1544 1586 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."); 1546 1589 1547 1590 /* TODO: */ 1548 1591 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).");1596 1592 1597 1593 STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteHandled, STAMTYPE_COUNTER, "/PGM/GC/CR3WriteInt", STAMUNIT_OCCURENCES, "The number of times the Guest CR3 change was successfully handled."); … … 1615 1611 STAM_REG(pVM, &pPGM->StatHCPrefetch, STAMTYPE_PROFILE, "/PGM/HC/Prefetch", STAMUNIT_TICKS_PER_CALL, "PGMR3PrefetchPage profiling."); 1616 1612 1617 STAM_REG(pVM, &pPGM->StatR3SyncPT, STAMTYPE_PROFILE, "/PGM/R3/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body.");1618 1613 1619 1614 … … 1625 1620 1626 1621 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 1631 1622 STAM_REG(pVM, &pPGM->StatHCGstModifyPage, STAMTYPE_PROFILE, "/PGM/HC/GstModifyPage", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGstModifyPage() body."); 1632 1623 STAM_REG(pVM, &pPGM->StatGCGstModifyPage, STAMTYPE_PROFILE, "/PGM/GC/GstModifyPage", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGstModifyPage() body."); 1633 1624 1625 STAM_REG(pVM, &pPGM->StatR3SyncPT, STAMTYPE_PROFILE, "/PGM/R3/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body."); 1634 1626 STAM_REG(pVM, &pPGM->StatSynPT4kGC, STAMTYPE_COUNTER, "/PGM/GC/SyncPT/4k", STAMUNIT_OCCURENCES, "Nr of 4k PT syncs"); 1635 1627 STAM_REG(pVM, &pPGM->StatSynPT4kHC, STAMTYPE_COUNTER, "/PGM/HC/SyncPT/4k", STAMUNIT_OCCURENCES, "Nr of 4k PT syncs"); … … 1669 1661 1670 1662 RTStrPrintf(szName, sizeof(szName), "/PGM/GC/PD/Trap0e/%04X", i); 1671 int rc = STAMR3Register(pVM, &pPGM->Stat GCTrap0ePD[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."); 1672 1664 AssertRC(rc); 1673 1665 -
trunk/src/VBox/VMM/PGMInternal.h
r13067 r13085 1006 1006 /** The flags (PGMPHYS_ROM_FLAG_*). */ 1007 1007 uint32_t fFlags; 1008 /**<Alignment padding ensuring that aPages is sizeof(PGMROMPAGE) aligned. */1008 /** Alignment padding ensuring that aPages is sizeof(PGMROMPAGE) aligned. */ 1009 1009 uint32_t au32Alignemnt[HC_ARCH_BITS == 32 ? 7 : 3]; 1010 1010 /** Pointer to the original bits when PGMPHYS_ROM_FLAG_PERMANENT_BINARY was specified. … … 1050 1050 * PCI devices with matching MMIO region numbers on a single device. */ 1051 1051 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. */ 1053 1053 uint8_t abAlignemnt[HC_ARCH_BITS == 32 ? 1 : 5]; 1054 1054 /** The associated RAM range. */ … … 2412 2412 2413 2413 /* 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 2414 2457 2415 2458 /* RZ & R3: */ … … 2448 2491 STAMCOUNTER StatRZInvalidatePagePDOutOfSync; /**< RC/R0: The number of times PGMInvalidatePage() was called for an out of sync page directory. */ 2449 2492 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. */ 2450 2495 2451 2496 STAMPROFILE StatR3SyncCR3; /**< R3: PGMSyncCR3() profiling. */ … … 2483 2528 STAMCOUNTER StatR3InvalidatePagePDOutOfSync; /**< R3: The number of times PGMInvalidatePage() was called for an out of sync page directory. */ 2484 2529 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. */ 2485 2532 2486 2533 /* TODO (cleanup): */ 2487 2534 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 2501 2536 STAMPROFILE StatHCPrefetch; 2502 2537 … … 2521 2556 STAMCOUNTER StatDynRamGrow; /** Nr of pgmr3PhysGrowRange calls. */ 2522 2557 2523 STAMCOUNTER Stat GCTrap0ePD[X86_PG_ENTRIES];2558 STAMCOUNTER StatRZTrap0ePD[X86_PG_ENTRIES]; 2524 2559 STAMCOUNTER StatGCSyncPtPD[X86_PG_ENTRIES]; 2525 2560 STAMCOUNTER StatGCSyncPagePD[X86_PG_ENTRIES]; 2526 2561 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;2562 2562 2563 2563 /** GC: The number of times user page is out of sync was detected in GC. */ … … 2575 2575 /** GC: The number of times pgmGCGuestPDWriteHandler() was called and a conflict was detected. */ 2576 2576 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;2591 2577 2592 2578 /** GC: The number of times pgmGCGuestROMWriteHandler() was successfully called. */ -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r13073 r13085 353 353 { 354 354 LogFlow(("PGMTrap0eHandler: uErr=%RGu pvFault=%VGv eip=%VGv\n", uErr, pvFault, pRegFrame->rip)); 355 STAM_PROFILE_START(&pVM->pgm.s.Stat GCTrap0e, a);355 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0e, a); 356 356 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } ); 357 357 … … 366 366 { 367 367 if (uErr & X86_TRAP_PF_RW) 368 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNotPresentWrite);368 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentWrite); 369 369 else 370 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNotPresentRead);370 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentRead); 371 371 } 372 372 else if (uErr & X86_TRAP_PF_RW) 373 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSWrite);373 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSWrite); 374 374 else if (uErr & X86_TRAP_PF_RSVD) 375 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSReserved);375 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSReserved); 376 376 else if (uErr & X86_TRAP_PF_ID) 377 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNXE);377 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNXE); 378 378 else 379 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSRead);379 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSRead); 380 380 } 381 381 else … … 384 384 { 385 385 if (uErr & X86_TRAP_PF_RW) 386 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVNotPresentWrite);386 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentWrite); 387 387 else 388 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVNotPresentRead);388 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentRead); 389 389 } 390 390 else if (uErr & X86_TRAP_PF_RW) 391 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVWrite);391 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVWrite); 392 392 else if (uErr & X86_TRAP_PF_ID) 393 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSNXE);393 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSNXE); 394 394 else if (uErr & X86_TRAP_PF_RSVD) 395 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVReserved);395 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVReserved); 396 396 } 397 397 #endif … … 404 404 rc = VINF_SUCCESS; 405 405 STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution)) 406 pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eMisc; });407 STAM_PROFILE_STOP_EX(&pVM->pgm.s.Stat GCTrap0e, 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); 408 408 return rc; 409 409 } -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r13067 r13085 128 128 LogFlow(("Trap0eHandler: guest iPDSrc=%u not present CR3=%VGp\n", iPDSrc, CPUMGetGuestCR3(pVM) & X86_CR3_PAGE_MASK)); 129 129 # endif 130 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eGuestTrap; });130 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2GuestTrap; }); 131 131 TRPMSetErrorCode(pVM, uErr); 132 132 return VINF_EM_RAW_GUEST_TRAP; … … 188 188 * tracking, or this page fault is a genuine one, then return immediately. 189 189 */ 190 STAM_PROFILE_START(&pVM->pgm.s.Stat CheckPageFault, e);190 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeCheckPageFault, e); 191 191 rc = PGM_BTH_NAME(CheckPageFault)(pVM, uErr, &pPDDst->a[iPDDst], &pPDSrc->a[iPDSrc], (RTGCUINTPTR)pvFault); 192 STAM_PROFILE_STOP(&pVM->pgm.s.Stat CheckPageFault, e);192 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeCheckPageFault, e); 193 193 if ( rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT 194 194 || rc == VINF_EM_RAW_GUEST_TRAP) 195 195 { 196 196 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) 197 = rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? &pVM->pgm.s.Stat Trap0eDirtyAndAccessedBits : &pVM->pgm.s.StatTrap0eGuestTrap; });197 = rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? &pVM->pgm.s.StatRZTrap0eTime2DirtyAndAccessed : &pVM->pgm.s.StatRZTrap0eTime2GuestTrap; }); 198 198 LogBird(("Trap0eHandler: returns %s\n", rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? "VINF_SUCCESS" : "VINF_EM_RAW_GUEST_TRAP")); 199 199 return rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? VINF_SUCCESS : rc; 200 200 } 201 201 202 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0ePD[iPDSrc]);202 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0ePD[iPDSrc]); 203 203 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 204 204 … … 230 230 231 231 { 232 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eSyncPT; });233 STAM_PROFILE_START(&pVM->pgm.s.Stat LazySyncPT, f);232 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2SyncPT; }); 233 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f); 234 234 LogFlow(("=>SyncPT %04x = %08x\n", iPDSrc, PdeSrc.au32[0])); 235 235 rc = PGM_BTH_NAME(SyncPT)(pVM, iPDSrc, pPDSrc, (RTGCUINTPTR)pvFault); 236 236 if (VBOX_SUCCESS(rc)) 237 237 { 238 STAM_PROFILE_STOP(&pVM->pgm.s.Stat LazySyncPT, f);238 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f); 239 239 return rc; 240 240 } 241 241 Log(("SyncPT: %d failed!! rc=%d\n", iPDSrc, rc)); 242 242 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); /** @todo no need to do global sync, right? */ 243 STAM_PROFILE_STOP(&pVM->pgm.s.Stat LazySyncPT, f);243 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeSyncPT, f); 244 244 return VINF_PGM_SYNC_CR3; 245 245 } … … 255 255 if (pgmMapAreMappingsEnabled(&pVM->pgm.s)) 256 256 { 257 STAM_PROFILE_START(&pVM->pgm.s.Stat Mapping, a);257 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeMapping, a); 258 258 PPGMMAPPING pMapping = pVM->pgm.s.CTX_SUFF(pMappings); 259 259 for ( ; pMapping; pMapping = pMapping->CTX_SUFF(pNext)) … … 272 272 if (pPDSrc->a[iPDSrc + iPT].n.u1Present) 273 273 { 274 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eConflicts);274 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eConflicts); 275 275 Log(("Trap0e: Detected Conflict %VGv-%VGv\n", pMapping->GCPtr, pMapping->GCPtrLast)); 276 276 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); /** @todo no need to do global sync,right? */ 277 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Mapping, a);277 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a); 278 278 return VINF_PGM_SYNC_CR3; 279 279 } … … 296 296 rc = VINF_EM_RAW_EMULATE_INSTR; /* can't happen with VMX */ 297 297 # endif 298 STAM_COUNTER_INC(&pVM->pgm.s.Stat Trap0eMapHandler);299 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Mapping, a);298 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersMapping); 299 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a); 300 300 return rc; 301 301 } … … 305 305 */ 306 306 TRPMSetErrorCode(pVM, uErr & ~X86_TRAP_PF_P); 307 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eMap);307 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eGuestPFMapping); 308 308 LogFlow(("PGM: Mapping access -> route trap to recompiler!\n")); 309 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Mapping, a);309 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a); 310 310 return VINF_EM_RAW_GUEST_TRAP; 311 311 } 312 312 } 313 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Mapping, a);313 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeMapping, a); 314 314 } /* pgmAreMappingsEnabled(&pVM->pgm.s) */ 315 315 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ … … 358 358 if (GCPhys != NIL_RTGCPHYS) 359 359 { 360 STAM_PROFILE_START(&pVM->pgm.s.Stat Handlers, b);360 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b); 361 361 362 362 PPGMPAGE pPage; … … 392 392 { 393 393 AssertRC(rc); 394 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersOutOfSync);395 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);396 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eOutOfSyncHndPhys; });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; }); 397 397 return rc; 398 398 } … … 414 414 # endif 415 415 rc = VINF_EM_RAW_EMULATE_INSTR; 416 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersPhysical);417 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);418 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eHndPhys; });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; }); 419 419 return rc; 420 420 } … … 438 438 { 439 439 AssertRC(rc); 440 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersOutOfSync);441 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);442 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eOutOfSyncHndVirt; });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; }); 443 443 return rc; 444 444 } … … 475 475 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 476 476 # endif 477 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersVirtual);478 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);479 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eHndVirt; });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; }); 480 480 return rc; 481 481 } … … 504 504 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 505 505 # endif 506 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersVirtualByPhys);507 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);508 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eHndVirt; });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; }); 509 509 return rc; 510 510 } … … 521 521 * write access handlers. Restart the instruction if it wasn't a write access. 522 522 */ 523 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersUnhandled);523 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersUnhandled); 524 524 525 525 if ( !PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage) … … 532 532 { 533 533 AssertRC(rc); 534 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersOutOfSync);535 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);536 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eOutOfSyncHndPhys; });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; }); 537 537 return rc; 538 538 } … … 547 547 PGM_PAGE_HAS_ANY_PHYSICAL_HANDLERS(pPage) ? " phys" : "", 548 548 PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(pPage) ? " virt" : "")); 549 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);550 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eHndUnhandled; });549 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b); 550 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndUnhandled; }); 551 551 return rc; 552 552 } /* if any kind of handler */ … … 582 582 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 583 583 # endif 584 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersVirtualUnmarked);585 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);586 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eHndVirt; });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; }); 587 587 return rc; 588 588 } … … 597 597 */ 598 598 LogFlow(("pgmPhysGetPageEx %VGp failed with %Vrc\n", GCPhys, rc)); 599 STAM_COUNTER_INC(&pVM->pgm.s.Stat HandlersInvalid);600 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);599 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eHandlersInvalid); 600 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b); 601 601 return VINF_EM_RAW_EMULATE_INSTR; 602 602 } 603 603 604 STAM_PROFILE_STOP(&pVM->pgm.s.Stat Handlers, b);604 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b); 605 605 606 606 # ifdef PGM_OUT_OF_SYNC_IN_GC … … 610 610 * Check it for page out-of-sync situation. 611 611 */ 612 STAM_PROFILE_START(&pVM->pgm.s.Stat OutOfSync, c);612 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c); 613 613 614 614 if (!(uErr & X86_TRAP_PF_P)) … … 663 663 AssertRC(rc2); 664 664 665 STAM_PROFILE_STOP(&pVM->pgm.s.Stat OutOfSync, c);666 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eCSAM; });665 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c); 666 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2CSAM; }); 667 667 return rc; 668 668 } … … 714 714 { 715 715 /* The page was successfully synced, return to the guest. */ 716 STAM_PROFILE_STOP(&pVM->pgm.s.Stat OutOfSync, c);717 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eOutOfSync; });716 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c); 717 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSync; }); 718 718 return VINF_SUCCESS; 719 719 } … … 754 754 AssertMsg(VBOX_SUCCESS(rc) && fPageShw & X86_PTE_RW, ("rc=%Vrc fPageShw=%VX64\n", rc, fPageShw)); 755 755 # endif /* VBOX_STRICT */ 756 STAM_PROFILE_STOP(&pVM->pgm.s.Stat OutOfSync, c);757 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eOutOfSyncObsHnd; });756 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c); 757 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2OutOfSyncHndObs; }); 758 758 return VINF_SUCCESS; 759 759 } … … 761 761 /* Check to see if we need to emulate the instruction as X86_CR0_WP has been cleared. */ 762 762 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) 764 764 && (uErr & (X86_TRAP_PF_RW | X86_TRAP_PF_P)) == (X86_TRAP_PF_RW | X86_TRAP_PF_P)) 765 765 { … … 771 771 rc = PGMInterpretInstruction(pVM, pRegFrame, pvFault); 772 772 if (VBOX_SUCCESS(rc)) 773 STAM_COUNTER_INC(&pVM->pgm.s.Stat Trap0eWPEmulGC);773 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eWPEmulInRZ); 774 774 else 775 STAM_COUNTER_INC(&pVM->pgm.s.Stat Trap0eWPEmulR3);775 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eWPEmulToR3); 776 776 return rc; 777 777 } 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)); 780 779 } 781 782 780 } 783 781 … … 813 811 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 814 812 } 815 STAM_PROFILE_STOP(&pVM->pgm.s.Stat OutOfSync, c);813 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeOutOfSync, c); 816 814 # endif /* PGM_OUT_OF_SYNC_IN_GC */ 817 815 } … … 841 839 */ 842 840 LogFlow(("PGM: Unhandled #PF -> route trap to recompiler!\n")); 843 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUnhandled);841 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eGuestPF); 844 842 return VINF_EM_RAW_GUEST_TRAP; 845 843 # else -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r13062 r13085 807 807 * Set the flags and flush shadow PT entries. 808 808 */ 809 STAM_COUNTER_INC(&pVM->pgm.s. StatHandlePhysicalReset);809 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PhysHandlerReset)); 810 810 PPGMRAMRANGE pRam = pgmPhysGetRange(&pVM->pgm.s, GCPhys); 811 811 Assert(pRam); … … 997 997 int pgmHandlerVirtualFindByPhysAddr(PVM pVM, RTGCPHYS GCPhys, PPGMVIRTHANDLER *ppVirt, unsigned *piPage) 998 998 { 999 STAM_PROFILE_START( CTXSUFF(&pVM->pgm.s.StatVirtHandleSearchByPhys), a);999 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a); 1000 1000 Assert(ppVirt); 1001 1001 … … 1012 1012 1013 1013 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); 1015 1015 return VINF_SUCCESS; 1016 1016 } 1017 1017 1018 1018 *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); 1020 1020 return VERR_PGM_HANDLER_NOT_FOUND; 1021 1021 } -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r13067 r13085 83 83 84 84 LogFlow(("PGMTrap0eHandler: uErr=%#x pvFault=%VGp eip=%VGv\n", uErr, pvFault, pRegFrame->rip)); 85 STAM_PROFILE_START(&pVM->pgm.s.Stat GCTrap0e, a);85 STAM_PROFILE_START(&pVM->pgm.s.StatRZTrap0e, a); 86 86 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } ); 87 87 … … 98 98 { 99 99 if (uErr & X86_TRAP_PF_RW) 100 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNotPresentWrite);100 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentWrite); 101 101 else 102 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNotPresentRead);102 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNotPresentRead); 103 103 } 104 104 else if (uErr & X86_TRAP_PF_RW) 105 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSWrite);105 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSWrite); 106 106 else if (uErr & X86_TRAP_PF_RSVD) 107 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSReserved);107 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSReserved); 108 108 else if (uErr & X86_TRAP_PF_ID) 109 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSNXE);109 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSNXE); 110 110 else 111 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eUSRead);111 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eUSRead); 112 112 } 113 113 else … … 116 116 { 117 117 if (uErr & X86_TRAP_PF_RW) 118 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVNotPresentWrite);118 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentWrite); 119 119 else 120 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVNotPresentRead);120 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVNotPresentRead); 121 121 } 122 122 else if (uErr & X86_TRAP_PF_RW) 123 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVWrite);123 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVWrite); 124 124 else if (uErr & X86_TRAP_PF_ID) 125 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSNXE);125 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSNXE); 126 126 else if (uErr & X86_TRAP_PF_RSVD) 127 STAM_COUNTER_INC(&pVM->pgm.s.Stat GCTrap0eSVReserved);127 STAM_COUNTER_INC(&pVM->pgm.s.StatRZTrap0eSVReserved); 128 128 } 129 129 #endif … … 159 159 rc = VINF_SUCCESS; 160 160 STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution)) 161 pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.Stat Trap0eMisc; });162 STAM_PROFILE_STOP_EX(&pVM->pgm.s.Stat GCTrap0e, 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); 163 163 return rc; 164 164 }
Note:
See TracChangeset
for help on using the changeset viewer.