VirtualBox

Changeset 13087 in vbox


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

#1865: More PGM changes.

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

Legend:

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

    r13085 r13087  
    14991499     */
    15001500
     1501    /* Common */
     1502#ifdef PGMPOOL_WITH_GCPHYS_TRACKING
     1503    STAM_REG(pVM, &pPGM->StatTrackVirgin,                   STAMTYPE_COUNTER, "/PGM/Track/Virgin",                  STAMUNIT_OCCURENCES,     "The number of first time shadowings");
     1504    STAM_REG(pVM, &pPGM->StatTrackAliased,                  STAMTYPE_COUNTER, "/PGM/Track/Aliased",                 STAMUNIT_OCCURENCES,     "The number of times switching to cRef2, i.e. the page is being shadowed by two PTs.");
     1505    STAM_REG(pVM, &pPGM->StatTrackAliasedMany,              STAMTYPE_COUNTER, "/PGM/Track/AliasedMany",             STAMUNIT_OCCURENCES,     "The number of times we're tracking using cRef2.");
     1506    STAM_REG(pVM, &pPGM->StatTrackAliasedLots,              STAMTYPE_COUNTER, "/PGM/Track/AliasedLots",             STAMUNIT_OCCURENCES,     "The number of times we're hitting pages which has overflowed cRef2");
     1507    STAM_REG(pVM, &pPGM->StatTrackOverflows,                STAMTYPE_COUNTER, "/PGM/Track/Overflows",               STAMUNIT_OCCURENCES,     "The number of times the extent list grows to long.");
     1508    STAM_REG(pVM, &pPGM->StatTrackDeref,                    STAMTYPE_PROFILE, "/PGM/Track/Deref",                   STAMUNIT_OCCURENCES,     "Profiling of SyncPageWorkerTrackDeref (expensive).");
     1509#endif
     1510
    15011511    /* R3 only: */
     1512    STAM_REG(pVM, &pPGM->StatR3DetectedConflicts,           STAMTYPE_COUNTER, "/PGM/R3/DetectedConflicts",          STAMUNIT_OCCURENCES,     "The number of times PGMR3CheckMappingConflicts() detected a conflict.");
     1513    STAM_REG(pVM, &pPGM->StatR3ResolveConflict,             STAMTYPE_PROFILE, "/PGM/R3/ResolveConflict",            STAMUNIT_TICKS_PER_CALL, "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation).");
     1514    STAM_REG(pVM, &pPGM->StatR3GuestPDWrite,                STAMTYPE_COUNTER, "/PGM/R3/PDWrite",                    STAMUNIT_OCCURENCES,     "The total number of times pgmHCGuestPDWriteHandler() was called.");
     1515    STAM_REG(pVM, &pPGM->StatR3GuestPDWriteConflict,        STAMTYPE_COUNTER, "/PGM/R3/PDWriteConflict",            STAMUNIT_OCCURENCES,     "The number of times pgmHCGuestPDWriteHandler() detected a conflict.");
    15021516
    15031517    /* GC only: */
    1504     STAM_REG(pVM, &pPGM->StatGCInvalidatePage,              STAMTYPE_PROFILE, "/PGM/GCInvalidatePage",              STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling.");
     1518    STAM_REG(pVM, &pPGM->StatRCInvalidatePage,              STAMTYPE_PROFILE, "/PGM/RC/InvalidatePage",             STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling.");
     1519    STAM_REG(pVM, &pPGM->StatRCDynMapCacheHits,             STAMTYPE_COUNTER, "/PGM/RC/DynMapCache/Hits" ,          STAMUNIT_OCCURENCES,     "Number of dynamic page mapping cache hits.");
     1520    STAM_REG(pVM, &pPGM->StatRCDynMapCacheMisses,           STAMTYPE_COUNTER, "/PGM/RC/DynMapCache/Misses" ,        STAMUNIT_OCCURENCES,     "Number of dynamic page mapping cache misses.");
    15051521
    15061522    /* RZ only: */
     
    15321548    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).");
    15331549    STAM_REG(pVM, &pPGM->StatRZTrap0eHandlersInvalid,       STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Handlers/Invalid",        STAMUNIT_OCCURENCES,     "Number of traps due to access to invalid physical memory.");
    1534     STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentRead,      STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPRead",         STAMUNIT_OCCURENCES,     "Number of user mode not present read page faults.");
    1535     STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPWrite",        STAMUNIT_OCCURENCES,     "Number of user mode not present write page faults.");
    1536     STAM_REG(pVM, &pPGM->StatRZTrap0eUSWrite,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Write",          STAMUNIT_OCCURENCES,     "Number of user mode write page faults.");
    1537     STAM_REG(pVM, &pPGM->StatRZTrap0eUSReserved,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Reserved",       STAMUNIT_OCCURENCES,     "Number of user mode reserved bit page faults.");
    1538     STAM_REG(pVM, &pPGM->StatRZTrap0eUSNXE,                 STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NXE",            STAMUNIT_OCCURENCES,     "Number of user mode NXE page faults.");
    1539     STAM_REG(pVM, &pPGM->StatRZTrap0eUSRead,                STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Read",           STAMUNIT_OCCURENCES,     "Number of user mode read page faults.");
    1540     STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentRead,      STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPRead",   STAMUNIT_OCCURENCES,     "Number of supervisor mode not present read page faults.");
    1541     STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPWrite",  STAMUNIT_OCCURENCES,     "Number of supervisor mode not present write page faults.");
    1542     STAM_REG(pVM, &pPGM->StatRZTrap0eSVWrite,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Write",    STAMUNIT_OCCURENCES,     "Number of supervisor mode write page faults.");
    1543     STAM_REG(pVM, &pPGM->StatRZTrap0eSVReserved,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Reserved", STAMUNIT_OCCURENCES,     "Number of supervisor mode reserved bit page faults.");
    1544     STAM_REG(pVM, &pPGM->StatRZTrap0eSNXE,                  STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NXE",      STAMUNIT_OCCURENCES,     "Number of supervisor mode NXE page faults.");
    1545     STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPF,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPF",             STAMUNIT_OCCURENCES,     "Number of real guest page faults.");
    1546     STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPFMapping,        STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPFInMapping",    STAMUNIT_OCCURENCES,     "Number of real guest page faults in a mapping.");
    1547     STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulInRZ,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/InRZ",             STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation.");
    1548     STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulToR3,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/ToR3",             STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation (forward to R3 for emulation).");
     1550    STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentRead,      STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPRead",             STAMUNIT_OCCURENCES,     "Number of user mode not present read page faults.");
     1551    STAM_REG(pVM, &pPGM->StatRZTrap0eUSNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NPWrite",            STAMUNIT_OCCURENCES,     "Number of user mode not present write page faults.");
     1552    STAM_REG(pVM, &pPGM->StatRZTrap0eUSWrite,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Write",              STAMUNIT_OCCURENCES,     "Number of user mode write page faults.");
     1553    STAM_REG(pVM, &pPGM->StatRZTrap0eUSReserved,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Reserved",           STAMUNIT_OCCURENCES,     "Number of user mode reserved bit page faults.");
     1554    STAM_REG(pVM, &pPGM->StatRZTrap0eUSNXE,                 STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/NXE",                STAMUNIT_OCCURENCES,     "Number of user mode NXE page faults.");
     1555    STAM_REG(pVM, &pPGM->StatRZTrap0eUSRead,                STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/User/Read",               STAMUNIT_OCCURENCES,     "Number of user mode read page faults.");
     1556    STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentRead,      STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPRead",       STAMUNIT_OCCURENCES,     "Number of supervisor mode not present read page faults.");
     1557    STAM_REG(pVM, &pPGM->StatRZTrap0eSVNotPresentWrite,     STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NPWrite",      STAMUNIT_OCCURENCES,     "Number of supervisor mode not present write page faults.");
     1558    STAM_REG(pVM, &pPGM->StatRZTrap0eSVWrite,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Write",        STAMUNIT_OCCURENCES,     "Number of supervisor mode write page faults.");
     1559    STAM_REG(pVM, &pPGM->StatRZTrap0eSVReserved,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/Reserved",     STAMUNIT_OCCURENCES,     "Number of supervisor mode reserved bit page faults.");
     1560    STAM_REG(pVM, &pPGM->StatRZTrap0eSNXE,                  STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/Supervisor/NXE",          STAMUNIT_OCCURENCES,     "Number of supervisor mode NXE page faults.");
     1561    STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPF,               STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPF",                 STAMUNIT_OCCURENCES,     "Number of real guest page faults.");
     1562    STAM_REG(pVM, &pPGM->StatRZTrap0eGuestPFMapping,        STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/GuestPFInMapping",        STAMUNIT_OCCURENCES,     "Number of real guest page faults in a mapping.");
     1563    STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulInRZ,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/InRZ",                 STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation.");
     1564    STAM_REG(pVM, &pPGM->StatRZTrap0eWPEmulToR3,            STAMTYPE_COUNTER, "/PGM/RZ/Trap0e/WP/ToR3",                 STAMUNIT_OCCURENCES,     "Number of guest page faults due to X86_CR0_WP emulation (forward to R3 for emulation).");
     1565    STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteHandled,        STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteHandled",                STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 change was successfully handled.");
     1566    STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteUnhandled,      STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteUnhandled",              STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 change was passed back to the recompiler.");
     1567    STAM_REG(pVM, &pPGM->StatRZGuestCR3WriteConflict,       STAMTYPE_COUNTER, "/PGM/RZ/CR3WriteConflict",               STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 monitoring detected a conflict.");
     1568    STAM_REG(pVM, &pPGM->StatRZGuestROMWriteHandled,        STAMTYPE_COUNTER, "/PGM/GC/ROMWriteHandled",                STAMUNIT_OCCURENCES,     "The number of times the Guest ROM change was successfully handled.");
     1569    STAM_REG(pVM, &pPGM->StatRZGuestROMWriteUnhandled,      STAMTYPE_COUNTER, "/PGM/GC/ROMWriteUnhandled",              STAMUNIT_OCCURENCES,     "The number of times the Guest ROM change was passed back to the recompiler.");
    15491570
    15501571    /* R0 only: */
     
    15871608    STAM_REG(pVM, &pPGM->StatRZVirtHandlerSearchByPhys,     STAMTYPE_PROFILE, "/PGM/RZ/VirtHandlerSearchByPhys",    STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr.");
    15881609    STAM_REG(pVM, &pPGM->StatRZPhysHandlerReset,            STAMTYPE_COUNTER, "/PGM/RZ/PhysHandlerReset",           STAMUNIT_OCCURENCES,     "The number of times PGMHandlerPhysicalReset is called.");
     1610    STAM_REG(pVM, &pPGM->StatRZPageOutOfSyncSupervisor,     STAMTYPE_COUNTER, "/PGM/RZ/OutOfSync/SuperVisor",       STAMUNIT_OCCURENCES,     "Number of traps due to pages out of sync and times VerifyAccessSyncPage calls SyncPage.");
     1611    STAM_REG(pVM, &pPGM->StatRZPageOutOfSyncUser,           STAMTYPE_COUNTER, "/PGM/RZ/OutOfSync/User",             STAMUNIT_OCCURENCES,     "Number of traps due to pages out of sync and times VerifyAccessSyncPage calls SyncPage.");
     1612    STAM_REG(pVM, &pPGM->StatRZPrefetch,                    STAMTYPE_PROFILE, "/PGM/RZ/Prefetch",                   STAMUNIT_TICKS_PER_CALL, "PGMPrefetchPage profiling.");
    15891613
    15901614    /* TODO: */
    1591 
    1592 
    1593     STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteHandled,        STAMTYPE_COUNTER, "/PGM/GC/CR3WriteInt",                STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 change was successfully handled.");
    1594     STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteUnhandled,      STAMTYPE_COUNTER, "/PGM/GC/CR3WriteEmu",                STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 change was passed back to the recompiler.");
    1595     STAM_REG(pVM, &pPGM->StatGCGuestCR3WriteConflict,       STAMTYPE_COUNTER, "/PGM/GC/CR3WriteConflict",           STAMUNIT_OCCURENCES,     "The number of times the Guest CR3 monitoring detected a conflict.");
    1596 
    1597     STAM_REG(pVM, &pPGM->StatGCPageOutOfSyncSupervisor,     STAMTYPE_COUNTER, "/PGM/GC/OutOfSync/SuperVisor",       STAMUNIT_OCCURENCES,     "Number of traps due to pages out of sync.");
    1598     STAM_REG(pVM, &pPGM->StatGCPageOutOfSyncUser,           STAMTYPE_COUNTER, "/PGM/GC/OutOfSync/User",             STAMUNIT_OCCURENCES,     "Number of traps due to pages out of sync.");
    1599 
    1600     STAM_REG(pVM, &pPGM->StatGCGuestROMWriteHandled,        STAMTYPE_COUNTER, "/PGM/GC/ROMWriteInt",                STAMUNIT_OCCURENCES,     "The number of times the Guest ROM change was successfully handled.");
    1601     STAM_REG(pVM, &pPGM->StatGCGuestROMWriteUnhandled,      STAMTYPE_COUNTER, "/PGM/GC/ROMWriteEmu",                STAMUNIT_OCCURENCES,     "The number of times the Guest ROM change was passed back to the recompiler.");
    1602 
    1603     STAM_REG(pVM, &pPGM->StatDynMapCacheHits,               STAMTYPE_COUNTER, "/PGM/GC/DynMapCache/Hits" ,          STAMUNIT_OCCURENCES,     "Number of dynamic page mapping cache hits.");
    1604     STAM_REG(pVM, &pPGM->StatDynMapCacheMisses,             STAMTYPE_COUNTER, "/PGM/GC/DynMapCache/Misses" ,        STAMUNIT_OCCURENCES,     "Number of dynamic page mapping cache misses.");
    1605 
    1606     STAM_REG(pVM, &pPGM->StatHCDetectedConflicts,           STAMTYPE_COUNTER, "/PGM/HC/DetectedConflicts",          STAMUNIT_OCCURENCES,     "The number of times PGMR3CheckMappingConflicts() detected a conflict.");
    1607     STAM_REG(pVM, &pPGM->StatHCGuestPDWrite,                STAMTYPE_COUNTER, "/PGM/HC/PDWrite",                    STAMUNIT_OCCURENCES,     "The total number of times pgmHCGuestPDWriteHandler() was called.");
    1608     STAM_REG(pVM, &pPGM->StatHCGuestPDWriteConflict,        STAMTYPE_COUNTER, "/PGM/HC/PDWriteConflict",            STAMUNIT_OCCURENCES,     "The number of times pgmHCGuestPDWriteHandler() detected a conflict.");
    1609 
    1610     STAM_REG(pVM, &pPGM->StatHCResolveConflict,             STAMTYPE_PROFILE, "/PGM/HC/ResolveConflict",            STAMUNIT_TICKS_PER_CALL, "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation).");
    1611     STAM_REG(pVM, &pPGM->StatHCPrefetch,                    STAMTYPE_PROFILE, "/PGM/HC/Prefetch",                   STAMUNIT_TICKS_PER_CALL, "PGMR3PrefetchPage profiling.");
    1612 
    16131615
    16141616
     
    16461648    STAM_REG(pVM, &pPGM->cZeroPages,                        STAMTYPE_U32,     "/PGM/Page/cZeroPages",                   STAMUNIT_OCCURENCES, "The number of zero backed pages.");
    16471649
    1648 #ifdef PGMPOOL_WITH_GCPHYS_TRACKING
    1649     STAM_REG(pVM, &pPGM->StatTrackVirgin,                   STAMTYPE_COUNTER, "/PGM/Track/Virgin",                  STAMUNIT_OCCURENCES,     "The number of first time shadowings");
    1650     STAM_REG(pVM, &pPGM->StatTrackAliased,                  STAMTYPE_COUNTER, "/PGM/Track/Aliased",                 STAMUNIT_OCCURENCES,     "The number of times switching to cRef2, i.e. the page is being shadowed by two PTs.");
    1651     STAM_REG(pVM, &pPGM->StatTrackAliasedMany,              STAMTYPE_COUNTER, "/PGM/Track/AliasedMany",             STAMUNIT_OCCURENCES,     "The number of times we're tracking using cRef2.");
    1652     STAM_REG(pVM, &pPGM->StatTrackAliasedLots,              STAMTYPE_COUNTER, "/PGM/Track/AliasedLots",             STAMUNIT_OCCURENCES,     "The number of times we're hitting pages which has overflowed cRef2");
    1653     STAM_REG(pVM, &pPGM->StatTrackOverflows,                STAMTYPE_COUNTER, "/PGM/Track/Overflows",               STAMUNIT_OCCURENCES,     "The number of times the extent list grows to long.");
    1654     STAM_REG(pVM, &pPGM->StatTrackDeref,                    STAMTYPE_PROFILE, "/PGM/Track/Deref",                   STAMUNIT_OCCURENCES,     "Profiling of SyncPageWorkerTrackDeref (expensive).");
    1655 #endif
    16561650
    16571651    for (unsigned i = 0; i < X86_PG_ENTRIES; i++)
  • trunk/src/VBox/VMM/PGMGst.h

    r13067 r13087  
    307307        {
    308308            Log(("pgmR3Gst32BitWriteHandlerCR3: detected conflict. iPD1=%#x iPD2=%#x GCPhys=%VGp\n", iPD1, iPD2, GCPhys));
    309             STAM_COUNTER_INC(&pVM->pgm.s.StatHCGuestPDWriteConflict);
     309            STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWriteConflict);
    310310            VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
    311311        }
    312312    }
    313313
    314     STAM_COUNTER_INC(&pVM->pgm.s.StatHCGuestPDWrite);
     314    STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite);
    315315    return VINF_SUCCESS;
    316316}
     
    379379
    380380
    381     STAM_COUNTER_INC(&pVM->pgm.s.StatHCGuestPDWrite);
     381    STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite);
    382382    return VINF_SUCCESS;
    383383}
     
    431431                    Log(("pgmR3GstPaePD3WriteHandler: detected conflict. i=%d iPD1=%#x iPD2=%#x GCPhys=%VGp\n",
    432432                         i, iPD1, iPD2, GCPhys));
    433                     STAM_COUNTER_INC(&pVM->pgm.s.StatHCGuestPDWriteConflict);
     433                    STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWriteConflict);
    434434                    VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
    435435                }
     
    439439    }
    440440
    441     STAM_COUNTER_INC(&pVM->pgm.s.StatHCGuestPDWrite);
     441    STAM_COUNTER_INC(&pVM->pgm.s.StatR3GuestPDWrite);
    442442    return VINF_SUCCESS;
    443443}
  • trunk/src/VBox/VMM/PGMInternal.h

    r13085 r13087  
    24062406    RTR0PTR                 padding1;
    24072407
     2408    /* Common */
     2409# ifdef PGMPOOL_WITH_GCPHYS_TRACKING
     2410    STAMCOUNTER StatTrackVirgin;                    /**< The number of first time shadowings. */
     2411    STAMCOUNTER StatTrackAliased;                   /**< The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */
     2412    STAMCOUNTER StatTrackAliasedMany;               /**< The number of times we're tracking using cRef2. */
     2413    STAMCOUNTER StatTrackAliasedLots;               /**< The number of times we're hitting pages which has overflowed cRef2. */
     2414    STAMCOUNTER StatTrackOverflows;                 /**< The number of times the extent list grows to long. */
     2415    STAMPROFILE StatTrackDeref;                     /**< Profiling of SyncPageWorkerTrackDeref (expensive). */
     2416# endif
     2417
    24082418    /* R3 only: */
    2409 
    2410     /* GC only: */
    2411     STAMPROFILE StatGCInvalidatePage;               /**< GC: PGMGCInvalidatePage() profiling. */
     2419    STAMCOUNTER StatR3DetectedConflicts;            /**< R3: Number of times PGMR3MapHasConflicts() detected a conflict. */
     2420    STAMPROFILE StatR3ResolveConflict;              /**< R3: pgmR3SyncPTResolveConflict() profiling (includes the entire relocation). */
     2421    STAMCOUNTER StatR3GuestPDWrite;                 /**< R3: The total number of times pgmHCGuestPDWriteHandler() was called. */
     2422    STAMCOUNTER StatR3GuestPDWriteConflict;         /**< R3: The number of times GuestPDWriteContlict() detected a conflict. */
     2423
     2424    /* RC only: */
     2425    STAMPROFILE StatRCInvalidatePage;               /**< RC: PGMGCInvalidatePage() profiling. */
     2426    STAMCOUNTER StatRCDynMapCacheMisses;            /**< RC: The number of dynamic page mapping cache hits */
     2427    STAMCOUNTER StatRCDynMapCacheHits;              /**< RC: The number of dynamic page mapping cache misses */
    24122428
    24132429    /* RZ only: */
     
    24542470    STAMCOUNTER StatRZTrap0eWPEmulInRZ;             /**< RC/R0: WP=0 virtualization trap, handled. */
    24552471    STAMCOUNTER StatRZTrap0eWPEmulToR3;             /**< RC/R0: WP=0 virtualization trap, chickened out. */
     2472    STAMCOUNTER StatRZGuestCR3WriteHandled;         /**< RC/R0: The number of times WriteHandlerCR3() was successfully called. */
     2473    STAMCOUNTER StatRZGuestCR3WriteUnhandled;       /**< RC/R0: The number of times WriteHandlerCR3() was called and we had to fall back to the recompiler. */
     2474    STAMCOUNTER StatRZGuestCR3WriteConflict;        /**< RC/R0: The number of times WriteHandlerCR3() was called and a conflict was detected. */
     2475    STAMCOUNTER StatRZGuestROMWriteHandled;         /**< RC/R0: The number of times pgmPhysRomWriteHandler() was successfully called. */
     2476    STAMCOUNTER StatRZGuestROMWriteUnhandled;       /**< RC/R0: The number of times pgmPhysRomWriteHandler() was called and we had to fall back to the recompiler */
    24562477
    24572478
     
    24932514    STAMPROFILE StatRZVirtHandlerSearchByPhys;      /**< RC/R0: Profiling of pgmHandlerVirtualFindByPhysAddr. */
    24942515    STAMCOUNTER StatRZPhysHandlerReset;             /**< RC/R0: The number of times PGMHandlerPhysicalReset is called. */
     2516    STAMCOUNTER StatRZPageOutOfSyncUser;            /**< RC/R0: The number of times user page is out of sync was detected in #PF or VerifyAccessSyncPage. */
     2517    STAMCOUNTER StatRZPageOutOfSyncSupervisor;      /**< RC/R0: The number of times supervisor page is out of sync was detected in in #PF or VerifyAccessSyncPage. */
     2518    STAMPROFILE StatRZPrefetch;                     /**< RC/R0: PGMPrefetchPage. */
    24952519
    24962520    STAMPROFILE StatR3SyncCR3;                      /**< R3: PGMSyncCR3() profiling. */
     
    25302554    STAMPROFILE StatR3VirtHandlerSearchByPhys;      /**< R3: Profiling of pgmHandlerVirtualFindByPhysAddr. */
    25312555    STAMCOUNTER StatR3PhysHandlerReset;             /**< R3: The number of times PGMHandlerPhysicalReset is called. */
     2556    STAMCOUNTER StatR3PageOutOfSyncUser;            /**< R3: The number of times user page is out of sync was detected in #PF or VerifyAccessSyncPage. */
     2557    STAMCOUNTER StatR3PageOutOfSyncSupervisor;      /**< R3: The number of times supervisor page is out of sync was detected in in #PF or VerifyAccessSyncPage. */
     2558    STAMPROFILE StatR3Prefetch;                     /**< R3: PGMPrefetchPage. */
    25322559
    25332560    /* TODO (cleanup):  */
    2534 
    2535 
    2536     STAMPROFILE StatHCPrefetch;
    2537 
    2538 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING
    2539     STAMCOUNTER StatTrackVirgin;                    /**< The number of first time shadowings. */
    2540     STAMCOUNTER StatTrackAliased;                   /**< The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */
    2541     STAMCOUNTER StatTrackAliasedMany;               /**< The number of times we're tracking using cRef2. */
    2542     STAMCOUNTER StatTrackAliasedLots;               /**< The number of times we're hitting pages which has overflowed cRef2. */
    2543     STAMCOUNTER StatTrackOverflows;                 /**< The number of times the extent list grows to long. */
    2544     STAMPROFILE StatTrackDeref;                     /**< Profiling of SyncPageWorkerTrackDeref (expensive). */
    2545 # endif
    25462561
    25472562    STAMCOUNTER StatPageHCMapTlbHits;               /** Ring-3/0 page mapper TLB hits. */
     
    25612576
    25622577
    2563     /** GC: The number of times user page is out of sync was detected in GC. */
    2564     STAMCOUNTER     StatGCPageOutOfSyncUser;
    2565     /** GC: The number of times supervisor page is out of sync was detected in GC. */
    2566     STAMCOUNTER     StatGCPageOutOfSyncSupervisor;
    2567     /** GC: The number of dynamic page mapping cache hits */
    2568     STAMCOUNTER     StatDynMapCacheMisses;
    2569     /** GC: The number of dynamic page mapping cache misses */
    2570     STAMCOUNTER     StatDynMapCacheHits;
    2571     /** GC: The number of times pgmGCGuestPDWriteHandler() was successfully called. */
    2572     STAMCOUNTER     StatGCGuestCR3WriteHandled;
    2573     /** GC: The number of times pgmGCGuestPDWriteHandler() was called and we had to fall back to the recompiler. */
    2574     STAMCOUNTER     StatGCGuestCR3WriteUnhandled;
    2575     /** GC: The number of times pgmGCGuestPDWriteHandler() was called and a conflict was detected. */
    2576     STAMCOUNTER     StatGCGuestCR3WriteConflict;
    2577 
    2578     /** GC: The number of times pgmGCGuestROMWriteHandler() was successfully called. */
    2579     STAMCOUNTER     StatGCGuestROMWriteHandled;
    2580     /** GC: The number of times pgmGCGuestROMWriteHandler() was called and we had to fall back to the recompiler */
    2581     STAMCOUNTER     StatGCGuestROMWriteUnhandled;
    2582 
    2583     /** HC: pgmr3SyncPTResolveConflict() profiling (includes the entire relocation). */
    2584     STAMPROFILE     StatHCResolveConflict;
    2585     /** HC: Number of times PGMR3CheckMappingConflicts() detected a conflict. */
    2586     STAMCOUNTER     StatHCDetectedConflicts;
    2587     /** HC: The total number of times pgmHCGuestPDWriteHandler() was called. */
    2588     STAMCOUNTER     StatHCGuestPDWrite;
    2589     /** HC: The number of times pgmHCGuestPDWriteHandler() detected a conflict */
    2590     STAMCOUNTER     StatHCGuestPDWriteConflict;
    2591 
    2592 
    25932578    /** GC: Profiling of the PGMGstModifyPage() body */
    2594     STAMPROFILE     StatGCGstModifyPage;
     2579    STAMPROFILE StatGCGstModifyPage;
    25952580    /** HC: Profiling of the PGMGstModifyPage() body */
    2596     STAMPROFILE     StatHCGstModifyPage;
     2581    STAMPROFILE StatHCGstModifyPage;
    25972582
    25982583    STAMCOUNTER StatSynPT4kGC;
  • trunk/src/VBox/VMM/PGMMap.cpp

    r13019 r13087  
    899899int pgmR3SyncPTResolveConflict(PVM pVM, PPGMMAPPING pMapping, PX86PD pPDSrc, RTGCPTR GCPtrOldMapping)
    900900{
    901     STAM_PROFILE_START(&pVM->pgm.s.StatHCResolveConflict, a);
     901    STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a);
    902902
    903903    /*
     
    942942        {
    943943            pgmR3MapRelocate(pVM, pMapping, GCPtrOldMapping, GCPtrNewMapping);
    944             STAM_PROFILE_STOP(&pVM->pgm.s.StatHCResolveConflict, a);
     944            STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a);
    945945            return VINF_SUCCESS;
    946946        }
    947947    }
    948948
    949     STAM_PROFILE_STOP(&pVM->pgm.s.StatHCResolveConflict, a);
     949    STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a);
    950950    AssertMsgFailed(("Failed to relocate page table mapping '%s' from %#x! (cPTs=%d)\n", pMapping->pszDesc, GCPtrOldMapping, cPTs));
    951951    return VERR_PGM_NO_HYPERVISOR_ADDRESS;
     
    963963int pgmR3SyncPTResolveConflictPAE(PVM pVM, PPGMMAPPING pMapping, RTGCPTR GCPtrOldMapping)
    964964{
    965     STAM_PROFILE_START(&pVM->pgm.s.StatHCResolveConflict, a);
     965    STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a);
    966966
    967967    for (int iPDPTE = X86_PG_PAE_PDPE_ENTRIES - 1; iPDPTE >= 0; iPDPTE--)
     
    10171017            {
    10181018                pgmR3MapRelocate(pVM, pMapping, GCPtrOldMapping, GCPtrNewMapping);
    1019                 STAM_PROFILE_STOP(&pVM->pgm.s.StatHCResolveConflict, a);
     1019                STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a);
    10201020                return VINF_SUCCESS;
    10211021            }
    10221022        }
    10231023    }
    1024     STAM_PROFILE_STOP(&pVM->pgm.s.StatHCResolveConflict, a);
     1024    STAM_PROFILE_STOP(&pVM->pgm.s.StatR3ResolveConflict, a);
    10251025    AssertMsgFailed(("Failed to relocate page table mapping '%s' from %#x! (cPTs=%d)\n", pMapping->pszDesc, GCPtrOldMapping, pMapping->cb >> X86_PD_PAE_SHIFT));
    10261026    return VERR_PGM_NO_HYPERVISOR_ADDRESS;
     
    10661066                    &&  (fRawR0 || pPD->a[iPDE + iPT].n.u1User))
    10671067                {
    1068                     STAM_COUNTER_INC(&pVM->pgm.s.StatHCDetectedConflicts);
     1068                    STAM_COUNTER_INC(&pVM->pgm.s.StatR3DetectedConflicts);
    10691069                    Log(("PGMR3HasMappingConflicts: Conflict was detected at %VGv for mapping %s (32 bits)\n"
    10701070                        "                          iPDE=%#x iPT=%#x PDE=%VGp.\n",
     
    10921092                    && (fRawR0 || Pde.n.u1User))
    10931093                {
    1094                     STAM_COUNTER_INC(&pVM->pgm.s.StatHCDetectedConflicts);
     1094                    STAM_COUNTER_INC(&pVM->pgm.s.StatR3DetectedConflicts);
    10951095                    Log(("PGMR3HasMappingConflicts: Conflict was detected at %VGv for mapping %s (PAE)\n"
    10961096                        "                          PDE=%VGp.\n",
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r13085 r13087  
    425425VMMDECL(int) PGMPrefetchPage(PVM pVM, RTGCPTR GCPtrPage)
    426426{
    427     STAM_PROFILE_START(&pVM->pgm.s.StatHCPrefetch, a);
     427    STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,Prefetch), a);
    428428    int rc = PGM_BTH_PFN(PrefetchPage, pVM)(pVM, (RTGCUINTPTR)GCPtrPage);
    429     STAM_PROFILE_STOP(&pVM->pgm.s.StatHCPrefetch, a);
     429    STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,Prefetch), a);
    430430    AssertMsg(rc == VINF_SUCCESS || rc == VINF_PGM_SYNC_CR3 || VBOX_FAILURE(rc), ("rc=%Vrc\n", rc));
    431431    return rc;
     
    18741874        void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT);
    18751875        *ppv = pv;
    1876         STAM_COUNTER_INC(&pVM->pgm.s.StatDynMapCacheHits);
     1876        STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits);
    18771877        //Log(("PGMGCDynMapHCPage: HCPhys=%VHp pv=%VGv iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache));
    18781878        return VINF_SUCCESS;
    18791879    }
    18801880    Assert(RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache) == 4);
    1881     STAM_COUNTER_INC(&pVM->pgm.s.StatDynMapCacheMisses);
     1881    STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheMisses);
    18821882
    18831883    /*
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r13085 r13087  
    620620                 */
    621621                if (uErr & X86_TRAP_PF_US)
    622                     STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncUser);
     622                    STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser));
    623623                else /* supervisor */
    624                     STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor);
     624                    STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor));
    625625
    626626#   if defined(LOG_ENABLED) && !defined(IN_RING0)
     
    729729                {
    730730                    if (uErr & X86_TRAP_PF_US)
    731                         STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncUser);
     731                        STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser));
    732732                    else /* supervisor */
    733                         STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor);
     733                        STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor));
    734734
    735735
     
    29962996        Assert(rc != VINF_EM_RAW_GUEST_TRAP);
    29972997        if (uErr & X86_TRAP_PF_US)
    2998             STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncUser);
     2998            STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncUser));
    29992999        else /* supervisor */
    3000             STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor);
     3000            STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageOutOfSyncSupervisor));
    30013001
    30023002        rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0);
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r13067 r13087  
    10201020               )
    10211021            {
    1022                 STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteConflict);
     1022                STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteConflict);
    10231023                VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
    10241024                if (rc == VINF_SUCCESS)
     
    10291029        }
    10301030
    1031         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteHandled);
     1031        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled);
    10321032    }
    10331033    else
     
    10371037            rc = VINF_EM_RAW_EMULATE_INSTR_PD_FAULT;
    10381038        Log(("pgmXXGst32BitWriteHandlerCR3: returns %Rrc\n", rc));
    1039         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteUnhandled);
     1039        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled);
    10401040    }
    10411041    return rc;
     
    10991099        }
    11001100
    1101         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteHandled);
     1101        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled);
    11021102    }
    11031103    else
    11041104    {
    11051105        Assert(VBOX_FAILURE(rc));
    1106         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteUnhandled);
     1106        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled);
    11071107        if (rc == VERR_EM_INTERPRETER)
    11081108            rc = VINF_EM_RAW_EMULATE_INSTR_PD_FAULT;
     
    11731173                    {
    11741174                        Log(("pgmXXGstPaeWriteHandlerPD: detected conflict iPD1=%#x iPD2=%#x\n", iPD1, iPD2));
    1175                         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteConflict);
     1175                        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteConflict);
    11761176                        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
    11771177                        return VINF_PGM_SYNC_CR3;
     
    11821182        Assert(i < 4);
    11831183
    1184         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteHandled);
     1184        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteHandled);
    11851185    }
    11861186    else
     
    11911191        else
    11921192            Log(("pgmXXGst32BitWriteHandlerCR3: returns %Rrc\n", rc));
    1193         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestCR3WriteUnhandled);
     1193        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestCR3WriteUnhandled);
    11941194    }
    11951195    return rc;
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r13062 r13087  
    9090            rc = EMInterpretDisasOne(pVM, pRegFrame, &Cpu, &cbOp);
    9191            if (     RT_SUCCESS(rc)
    92                 &&   Cpu.mode == CPUMODE_32BIT  /* @todo why does this matter? */
     92                &&   Cpu.mode == CPUMODE_32BIT  /** @todo why does this matter? */
    9393                &&  !(Cpu.prefix & (PREFIX_REPNE | PREFIX_REP | PREFIX_SEG)))
    9494            {
     
    9999                    case OP_MOV:
    100100                        pRegFrame->rip += cbOp;
    101                         STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestROMWriteHandled);
     101                        STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestROMWriteHandled);
    102102                        return VINF_SUCCESS;
    103103                }
     
    123123#endif
    124124
    125     STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestROMWriteUnhandled);
     125    STAM_COUNTER_INC(&pVM->pgm.s.StatRZGuestROMWriteUnhandled);
    126126    return VINF_EM_RAW_EMULATE_INSTR;
    127127}
  • trunk/src/VBox/VMM/VMMGC/PGMGC.cpp

    r13067 r13087  
    177177    LogFlow(("PGMGCInvalidatePage: GCPtrPage=%VGv\n", GCPtrPage));
    178178
    179     STAM_PROFILE_START(&pVM->pgm.s.StatGCInvalidatePage, a);
     179    STAM_PROFILE_START(&pVM->pgm.s.StatRCInvalidatePage, a);
    180180
    181181    /*
     
    189189            LogFlow(("PGMGCInvalidatePage: Conflict!\n"));
    190190            VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
    191             STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a);
     191            STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a);
    192192            return VINF_PGM_SYNC_CR3;
    193193        }
     
    196196        {
    197197            LogFlow(("PGMGCInvalidatePage: PGM_SYNC_MONITOR_CR3 -> reinterpret instruction in HC\n"));
    198             STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a);
     198            STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a);
    199199            /** @todo counter for these... */
    200200            return VINF_EM_RAW_EMULATE_INSTR;
     
    210210        rc = PGM_BTH_PFN(InvalidatePage, pVM)(pVM, GCPtrPage);
    211211
    212     STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a);
     212    STAM_PROFILE_STOP(&pVM->pgm.s.StatRCInvalidatePage, a);
    213213    return rc;
    214214}
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