VirtualBox

Changeset 27163 in vbox for trunk


Ignore:
Timestamp:
Mar 8, 2010 1:18:49 PM (15 years ago)
Author:
vboxsync
Message:

Profiling of large page allocation

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

Legend:

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

    r27129 r27163  
    16171617        rc = STAMR3RegisterF(pVM, a, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, c, b); \
    16181618        AssertRC(rc);
     1619
     1620    PGM_REG_PROFILE(&pPGM->StatAllocLargePage,                "/PGM/LargePage/Prof/Alloc",          "Time spent by the host OS for large page allocation.");
     1621    PGM_REG_PROFILE(&pPGM->StatClearLargePage,                "/PGM/LargePage/Prof/Clear",          "Time spent clearing the newly allocated large pages.");
     1622    PGM_REG_PROFILE(&pPGM->StatR3IsValidLargePage,            "/PGM/LargePage/Prof/R3/IsValid",     "pgmPhysIsValidLargePage profiling - R3.");
     1623    PGM_REG_PROFILE(&pPGM->StatRZIsValidLargePage,            "/PGM/LargePage/Prof/RZ/IsValid",     "pgmPhysIsValidLargePage profiling - RZ.");
    16191624
    16201625    PGM_REG_COUNTER(&pPGM->StatR3DetectedConflicts,           "/PGM/R3/DetectedConflicts",          "The number of times PGMR3CheckMappingConflicts() detected a conflict.");
  • trunk/src/VBox/VMM/PGMInternal.h

    r27065 r27163  
    28602860    STAMCOUNTER StatTrackOverflows;                 /**< The number of times the extent list grows to long. */
    28612861    STAMPROFILE StatTrackDeref;                     /**< Profiling of SyncPageWorkerTrackDeref (expensive). */
     2862
     2863    /** Time spent by the host OS for large page allocation. */
     2864    STAMPROFILE                 StatAllocLargePage;
     2865    /** Time spent clearing the newly allocated large pages. */
     2866    STAMPROFILE                 StatClearLargePage;
     2867    /** pgmPhysIsValidLargePage profiling - R3 */
     2868    STAMPROFILE                 StatR3IsValidLargePage;
     2869    /** pgmPhysIsValidLargePage profiling - RZ*/
     2870    STAMPROFILE                 StatRZIsValidLargePage;
    28622871#endif
    28632872} PGM;
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r27129 r27163  
    32483248    pgmLock(pVM);
    32493249
     3250    STAM_PROFILE_START(&pVM->pgm.s.StatAllocLargePage, a);
    32503251    int rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_ALLOCATE_LARGE_HANDY_PAGE, 0, NULL);
     3252    STAM_PROFILE_STOP(&pVM->pgm.s.StatAllocLargePage, a);
    32513253    if (RT_SUCCESS(rc))
    32523254    {
     
    32733275             * Clear the pages.
    32743276             */
     3277            STAM_PROFILE_START(&pVM->pgm.s.StatClearLargePage, a);
    32753278            for (unsigned i = 0; i < _2M/PAGE_SIZE; i++)
    32763279            {
     
    33043307                Log3(("PGMR3PhysAllocateLargePage: idPage=%#x HCPhys=%RGp\n", idPage, HCPhys));
    33053308            }
     3309            STAM_PROFILE_STOP(&pVM->pgm.s.StatClearLargePage, a);
     3310
    33063311            /* Flush all TLBs. */
    33073312            PGM_INVL_ALL_VCPU_TLBS(pVM);
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r27129 r27163  
    581581    }
    582582
     583    STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,IsValidLargePage), a);
    583584    /* Check all remaining pages in the 2 MB range. */
    584585    GCPhys += PAGE_SIZE;
     
    600601        GCPhys += PAGE_SIZE;
    601602    }
     603    STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,IsValidLargePage), a);
     604
    602605    if (i == _2M/PAGE_SIZE)
    603606    {
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