summaryrefslogtreecommitdiff
path: root/src/VBox/Devices/VMMDev/VMMDevState.h
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-11-17 01:26:43 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-11-17 01:26:43 +0000
commit0d22a87441d4f3199aa9d45ee01b78c5b6d71556 (patch)
tree9f0a9365ee8d78ffcd1789d0c9f21a150a808846 /src/VBox/Devices/VMMDev/VMMDevState.h
parent6c4894783d6c791add0df1517d98915a7a6adabc (diff)
downloadVirtualBox-svn-0d22a87441d4f3199aa9d45ee01b78c5b6d71556.tar.gz
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
Diffstat (limited to 'src/VBox/Devices/VMMDev/VMMDevState.h')
-rw-r--r--src/VBox/Devices/VMMDev/VMMDevState.h11
1 files changed, 6 insertions, 5 deletions
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 <iprt/list.h>
+#include <iprt/memcache.h>
+
#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. */