VirtualBox

Changeset 72300 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
May 23, 2018 3:13:06 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122749
Message:

NEM,STAM: Partition memory statistics for NEM. bugref:9044

  • STAM: Redid the way we handle statistics requiring fetching data from ring-0 (or elsewhere) by introducing a refresh group concept. We'll refresh the statistics for a group if needed and only once per enumeration/query. There's a new registration API for these.
  • NEM: Added memory balance statistics for the partition. Some failed fumbling thru VID.DLL/SYS, before realizing that hypercall is the only way to get at them.
  • NEM: Added a hypervisor input/output page buffer for non-EMT threads so we can get statistics. Put the related data and code into separate structure to save duplication.
Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/NEMInternal.h

    r72221 r72300  
    2727#ifdef RT_OS_WINDOWS
    2828#include <iprt/nt/hyperv.h>
     29#include <iprt/critsect.h>
    2930#endif
    3031
     
    160161    NEMWINIOCTL                 IoCtlMessageSlotHandleAndGetNext;
    161162
     163    /** Statistics updated by NEMR0UpdateStatistics. */
     164    struct
     165    {
     166        uint64_t                cPagesAvailable;
     167        uint64_t                cPagesInUse;
     168    } R0Stats;
    162169#endif /* RT_OS_WINDOWS */
    163170} NEM;
     
    256263
    257264#ifdef IN_RING0
     265# ifdef RT_OS_WINDOWS
     266/**
     267 * Windows: Hypercall input/ouput page info.
     268 */
     269typedef struct NEMR0HYPERCALLDATA
     270{
     271    /** Host physical address of the hypercall input/output page. */
     272    RTHCPHYS                    HCPhysPage;
     273    /** Pointer to the hypercall input/output page. */
     274    uint8_t                    *pbPage;
     275    /** Handle to the memory object of the hypercall input/output page. */
     276    RTR0MEMOBJ                  hMemObj;
     277} NEMR0HYPERCALLDATA;
     278/** Pointer to a Windows hypercall input/output page info. */
     279typedef NEMR0HYPERCALLDATA *PNEMR0HYPERCALLDATA;
     280# endif /* RT_OS_WINDOWS */
    258281
    259282/**
     
    263286{
    264287# ifdef RT_OS_WINDOWS
    265     /** @name Hypercall input/ouput page.
    266      * @{ */
    267     /** Host physical address of the hypercall input/output page. */
    268     RTHCPHYS                    HCPhysHypercallData;
    269     /** Pointer to the hypercall input/output page. */
    270     uint8_t                    *pbHypercallData;
    271     /** Handle to the memory object of the hypercall input/output page. */
    272     RTR0MEMOBJ                  hHypercallDataMemObj;
    273     /** @} */
     288    /** Hypercall input/ouput page. */
     289    NEMR0HYPERCALLDATA          HypercallData;
    274290# else
    275291    uint32_t                    uDummy;
     
    298314    NEMWINIOCTL                 IoCtlMessageSlotHandleAndGetNext;
    299315
     316    /** Hypercall input/ouput page for non-EMT. */
     317    NEMR0HYPERCALLDATA          HypercallData;
     318    /** Critical section protecting use of HypercallData. */
     319    RTCRITSECT                  HypercallDataCritSect;
     320
    300321# else
    301322    uint32_t                    uDummy;
  • trunk/src/VBox/VMM/include/STAMInternal.h

    r69474 r72300  
    124124    /** Unit. */
    125125    STAMUNIT            enmUnit;
     126    /** The refresh group number (STAM_REFRESH_GRP_XXX). */
     127    uint8_t             iRefreshGroup;
    126128    /** Description. */
    127129    const char         *pszDesc;
Note: See TracChangeset for help on using the changeset viewer.

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