VirtualBox

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


Ignore:
Timestamp:
Jul 2, 2009 2:08:29 PM (16 years ago)
Author:
vboxsync
Message:

Extra statistics for PGMPhysRead/Write

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

Legend:

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

    r20925 r21164  
    15771577        AssertRC(rc);
    15781578
     1579# define PGM_REG_COUNTER_BYTES(a, b, c) \
     1580        rc = STAMR3RegisterF(pVM, a, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, c, b); \
     1581        AssertRC(rc);
     1582
    15791583# define PGM_REG_PROFILE(a, b, c) \
    15801584        rc = STAMR3RegisterF(pVM, a, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, c, b); \
     
    15831587    PGM_REG_COUNTER(&pPGM->StatR3DetectedConflicts,           "/PGM/R3/DetectedConflicts",          "The number of times PGMR3CheckMappingConflicts() detected a conflict.");
    15841588    PGM_REG_PROFILE(&pPGM->StatR3ResolveConflict,             "/PGM/R3/ResolveConflict",            "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation).");
     1589    PGM_REG_COUNTER(&pPGM->StatR3PhysRead,                    "/PGM/R3/Phys/Read",                  "The number of times PGMPhysRead was called.");
     1590    PGM_REG_COUNTER_BYTES(&pPGM->StatR3PhysReadBytes,         "/PGM/R3/Phys/Read/Bytes",            "The number of bytes read by PGMPhysRead.");
     1591    PGM_REG_COUNTER(&pPGM->StatR3PhysWrite,                   "/PGM/R3/Phys/Write",                 "The number of times PGMPhysWrite was called.");
     1592    PGM_REG_COUNTER_BYTES(&pPGM->StatR3PhysWriteBytes,        "/PGM/R3/Phys/Write/Bytes",           "The number of bytes written by PGMPhysWrite.");
    15851593
    15861594    PGM_REG_COUNTER(&pPGM->StatRZChunkR3MapTlbHits,           "/PGM/ChunkR3Map/TlbHitsRZ",          "TLB hits.");
     
    16101618/// @todo    PGM_REG_COUNTER(&pPGM->StatR3PageHandyAllocs,             "/PGM/R3/Page/HandyAllocs",               "Number of times we've allocated more handy pages.");
    16111619
     1620    PGM_REG_COUNTER(&pPGM->StatRZPhysRead,                    "/PGM/RZ/Phys/Read",                  "The number of times PGMPhysRead was called.");
     1621    PGM_REG_COUNTER_BYTES(&pPGM->StatRZPhysReadBytes,         "/PGM/RZ/Phys/Read/Bytes",            "The number of bytes read by PGMPhysRead.");
     1622    PGM_REG_COUNTER(&pPGM->StatRZPhysWrite,                   "/PGM/RZ/Phys/Write",                 "The number of times PGMPhysWrite was called.");
     1623    PGM_REG_COUNTER_BYTES(&pPGM->StatRZPhysWriteBytes,        "/PGM/RZ/Phys/Write/Bytes",           "The number of bytes written by PGMPhysWrite.");
     1624
    16121625    /* GC only: */
    16131626    PGM_REG_COUNTER(&pPGM->StatRCDynMapCacheHits,             "/PGM/RC/DynMapCache/Hits" ,          "Number of dynamic page mapping cache hits.");
     
    16151628    PGM_REG_COUNTER(&pPGM->StatRCInvlPgConflict,              "/PGM/RC/InvlPgConflict",             "Number of times PGMInvalidatePage() detected a mapping conflict.");
    16161629    PGM_REG_COUNTER(&pPGM->StatRCInvlPgSyncMonCR3,            "/PGM/RC/InvlPgSyncMonitorCR3",       "Number of times PGMInvalidatePage() ran into PGM_SYNC_MONITOR_CR3.");
     1630
     1631    PGM_REG_COUNTER(&pPGM->StatRCPhysRead,                    "/PGM/RC/Phys/Read",                  "The number of times PGMPhysRead was called.");
     1632    PGM_REG_COUNTER_BYTES(&pPGM->StatRCPhysReadBytes,         "/PGM/RC/Phys/Read/Bytes",            "The number of bytes read by PGMPhysRead.");
     1633    PGM_REG_COUNTER(&pPGM->StatRCPhysWrite,                   "/PGM/RC/Phys/Write",                 "The number of times PGMPhysWrite was called.");
     1634    PGM_REG_COUNTER_BYTES(&pPGM->StatRCPhysWriteBytes,        "/PGM/RC/Phys/Write/Bytes",           "The number of bytes written by PGMPhysWrite.");
    16171635
    16181636# ifdef PGMPOOL_WITH_GCPHYS_TRACKING
  • trunk/src/VBox/VMM/PGMInternal.h

    r20808 r21164  
    24802480    STAMCOUNTER StatRCInvlPgSyncMonCR3;             /**< RC: Number of times PGMInvalidatePage() ran into PGM_SYNC_MONITOR_CR3. */
    24812481
     2482    STAMCOUNTER StatRZPhysRead;
     2483    STAMCOUNTER StatRZPhysReadBytes;
     2484    STAMCOUNTER StatRZPhysWrite;
     2485    STAMCOUNTER StatRZPhysWriteBytes;
     2486    STAMCOUNTER StatR3PhysRead;
     2487    STAMCOUNTER StatR3PhysReadBytes;
     2488    STAMCOUNTER StatR3PhysWrite;
     2489    STAMCOUNTER StatR3PhysWriteBytes;
     2490    STAMCOUNTER StatRCPhysRead;
     2491    STAMCOUNTER StatRCPhysReadBytes;
     2492    STAMCOUNTER StatRCPhysWrite;
     2493    STAMCOUNTER StatRCPhysWriteBytes;
     2494
    24822495# ifdef PGMPOOL_WITH_GCPHYS_TRACKING
    24832496    STAMCOUNTER StatTrackVirgin;                    /**< The number of first time shadowings. */
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r20874 r21164  
    15111511    LogFlow(("PGMPhysRead: %RGp %d\n", GCPhys, cbRead));
    15121512
     1513    STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PhysRead));
     1514    STAM_COUNTER_ADD(&pVM->pgm.s.CTX_MID_Z(Stat,PhysReadBytes), cbRead);
     1515
    15131516    pgmLock(pVM);
    15141517
     
    20232026    LogFlow(("PGMPhysWrite: %RGp %d\n", GCPhys, cbWrite));
    20242027
     2028    STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PhysWrite));
     2029    STAM_COUNTER_ADD(&pVM->pgm.s.CTX_MID_Z(Stat,PhysWriteBytes), cbWrite);
     2030
    20252031    pgmLock(pVM);
    20262032
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