VirtualBox

Changeset 72300 in vbox for trunk/include/VBox


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/include/VBox/vmm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/gvm.h

    r71290 r72300  
    146146        struct NEMR0PERVM   s;
    147147# endif
    148         uint8_t             padding[128];
     148        uint8_t             padding[256];
    149149    } nem;
    150150#endif
     
    166166#ifdef VBOX_WITH_NEM_R0
    167167AssertCompileMemberOffset(GVM, nem,    64 + 256 + 512);
    168 AssertCompileMemberOffset(GVM, rawpci, 64 + 256 + 512 + 128);
    169 AssertCompileMemberOffset(GVM, aCpus,  64 + 256 + 512 + 128 + 64);
     168AssertCompileMemberOffset(GVM, rawpci, 64 + 256 + 512 + 256);
     169AssertCompileMemberOffset(GVM, aCpus,  64 + 256 + 512 + 256 + 64);
    170170#else
    171171AssertCompileMemberOffset(GVM, rawpci, 64 + 256 + 512);
  • trunk/include/VBox/vmm/nem.h

    r72267 r72300  
    9292VMMR0_INT_DECL(int)  NEMR0ImportState(PGVM pGVM, PVM pVM, VMCPUID idCpu, uint64_t fWhat);
    9393VMMR0_INT_DECL(VBOXSTRICTRC) NEMR0RunGuestCode(PGVM pGVM, VMCPUID idCpu);
     94VMMR0_INT_DECL(int)  NEMR0UpdateStatistics(PGVM pGVM, PVM pVM, VMCPUID idCpu);
    9495/** @} */
    9596
  • trunk/include/VBox/vmm/stam.h

    r69107 r72300  
    230230} STAMUNIT;
    231231
     232/** @name STAM_REFRESH_GRP_XXX - STAM refresh groups
     233 * @{ */
     234#define STAM_REFRESH_GRP_NONE       UINT8_MAX
     235#define STAM_REFRESH_GRP_GVMM       0
     236#define STAM_REFRESH_GRP_GMM        1
     237#define STAM_REFRESH_GRP_NEM        2
     238/** @} */
     239
    232240
    233241/** @def STAM_REL_U8_INC
     
    12061214                                        PFNSTAMR3CALLBACKRESET pfnReset, PFNSTAMR3CALLBACKPRINT pfnPrint,
    12071215                                        const char *pszDesc, const char *pszName, va_list args) RT_IPRT_FORMAT_ATTR(8, 0);
     1216
     1217VMMR3DECL(int)  STAMR3RegisterRefresh(PUVM pUVM, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility,
     1218                                      STAMUNIT enmUnit, uint8_t iRefreshGrp, const char *pszDesc,
     1219                                      const char *pszName, ...) RT_IPRT_FORMAT_ATTR(8, 9);
     1220VMMR3DECL(int)  STAMR3RegisterRefreshV(PUVM pUVM, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility,
     1221                                       STAMUNIT enmUnit, uint8_t iRefreshGrp, const char *pszDesc,
     1222                                       const char *pszName, va_list va) RT_IPRT_FORMAT_ATTR(8, 0);
     1223
    12081224VMMR3DECL(int)  STAMR3Deregister(PUVM pUVM, const char *pszPat);
    12091225VMMR3DECL(int)  STAMR3DeregisterF(PUVM pUVM, const char *pszPatFmt, ...) RT_IPRT_FORMAT_ATTR(2, 3);
  • trunk/include/VBox/vmm/vmm.h

    r71222 r72300  
    446446    /** Call NEMR0ImportState() (host specific). */
    447447    VMMR0_DO_NEM_IMPORT_STATE,
     448    /** Call NEMR0UpdateStatistics() (host specific). */
     449    VMMR0_DO_NEM_UPDATE_STATISTICS,
    448450
    449451    /** Official call we use for testing Ring-0 APIs. */
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