From 0d22a87441d4f3199aa9d45ee01b78c5b6d71556 Mon Sep 17 00:00:00 2001 From: vboxsync Date: Sat, 17 Nov 2018 01:26:43 +0000 Subject: VMMDev/HGCM: Use an allocation cache for HGCM command structures with 6 or fewer parameters (also connect and disconnect). Moved the connection location out of the union just like the parameters, as it's 132 bytes big. bugref:9172 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@75537 cfe28804-0f27-0410-a406-dd0f0b0b656f --- src/VBox/Devices/VMMDev/VMMDevState.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/VBox/Devices/VMMDev/VMMDevState.h') diff --git a/src/VBox/Devices/VMMDev/VMMDevState.h b/src/VBox/Devices/VMMDev/VMMDevState.h index 8fd3f7726d8..e4c091c4a2b 100644 --- a/src/VBox/Devices/VMMDev/VMMDevState.h +++ b/src/VBox/Devices/VMMDev/VMMDevState.h @@ -28,6 +28,8 @@ #endif #include +#include + #define VMMDEV_WITH_ALT_TIMESYNC @@ -282,15 +284,13 @@ typedef struct VMMDevState uint32_t u32HGCMEnabled; /** Saved state version of restored commands. */ uint32_t u32SSMVersion; -# if HC_ARCH_BITS == 32 - /** Alignment padding. */ - uint32_t u32Alignment7; -# endif + RTMEMCACHE hHgcmCmdCache; STAMPROFILE StatHgcmCmdArrival; STAMPROFILE StatHgcmCmdCompletion; STAMPROFILE StatHgcmCmdTotal; - STAMCOUNTER StatHgcmReqBufAllocs; + STAMCOUNTER StatHgcmLargeCmdAllocs; #endif /* VBOX_WITH_HGCM */ + STAMCOUNTER StatReqBufAllocs; /** Per CPU request 4K sized buffers, allocated as needed. */ R3PTRTYPE(VMMDevRequestHeader *) apReqBufs[VMM_MAX_CPU_COUNT]; @@ -405,6 +405,7 @@ AssertCompileMemberAlignment(VMMDEV, TestingData.Value.u64Value, 8); void VMMDevNotifyGuest(VMMDEV *pVMMDevState, uint32_t u32EventMask); void VMMDevCtlSetGuestFilterMask(VMMDEV *pVMMDevState, uint32_t u32OrMask, uint32_t u32NotMask); + /** The saved state version. */ #define VMMDEV_SAVED_STATE_VERSION VMMDEV_SAVED_STATE_VERSION_HGCM_PARAMS /** Updated HGCM commands. */ -- cgit v1.2.1