- Timestamp:
- Sep 5, 2007 9:19:39 AM (17 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r4513 r4528 177 177 CheckComRCReturnRC (autoCaller.rc()); 178 178 179 Auto ReaderLock alock (this);179 AutoLock alock (this); 180 180 181 181 HRESULT ret = mParent->machine()->COMSETTER(MemoryBalloonSize)(aMemoryBalloonSize); … … 212 212 CheckComRCReturnRC (autoCaller.rc()); 213 213 214 AutoReaderLock alock (this); 215 216 mStatUpdateInterval = aUpdateInterval; 217 218 return S_OK; 214 AutoLock alock (this); 215 216 HRESULT ret = mParent->machine()->COMSETTER(StatisticsUpdateInterval)(aUpdateInterval); 217 if (ret == S_OK) 218 { 219 mStatUpdateInterval = aUpdateInterval; 220 /* forward the information to the VMM device */ 221 VMMDev *vmmDev = mParent->getVMMDev(); 222 if (vmmDev) 223 vmmDev->getVMMDevPort()->pfnSetStatisticsInterval(vmmDev->getVMMDevPort(), aUpdateInterval); 224 } 225 226 return ret; 219 227 } 220 228 -
trunk/src/VBox/Main/MachineImpl.cpp
r4513 r4528 166 166 mMemorySize = 128; 167 167 mMemoryBalloonSize = 0; 168 mStatisticsUpdateInterval = 0; 168 169 mVRAMSize = 8; 169 170 mMonitorCount = 1; … … 191 192 if (mMemorySize != that.mMemorySize || 192 193 mMemoryBalloonSize != that.mMemoryBalloonSize || 194 mStatisticsUpdateInterval != that.mStatisticsUpdateInterval || 193 195 mVRAMSize != that.mVRAMSize || 194 196 mMonitorCount != that.mMonitorCount || … … 981 983 } 982 984 983 985 /** @todo this method should not be public */ 984 986 STDMETHODIMP Machine::COMGETTER(MemoryBalloonSize) (ULONG *memoryBalloonSize) 985 987 { … … 997 999 } 998 1000 1001 /** @todo this method should not be public */ 999 1002 STDMETHODIMP Machine::COMSETTER(MemoryBalloonSize) (ULONG memoryBalloonSize) 1000 1003 { … … 1015 1018 mHWData.backup(); 1016 1019 mHWData->mMemoryBalloonSize = memoryBalloonSize; 1020 1021 return S_OK; 1022 } 1023 1024 /** @todo this method should not be public */ 1025 STDMETHODIMP Machine::COMGETTER(StatisticsUpdateInterval) (ULONG *statisticsUpdateInterval) 1026 { 1027 if (!statisticsUpdateInterval) 1028 return E_POINTER; 1029 1030 AutoCaller autoCaller (this); 1031 CheckComRCReturnRC (autoCaller.rc()); 1032 1033 AutoReaderLock alock (this); 1034 1035 *statisticsUpdateInterval = mHWData->mStatisticsUpdateInterval; 1036 1037 return S_OK; 1038 } 1039 1040 /** @todo this method should not be public */ 1041 STDMETHODIMP Machine::COMSETTER(StatisticsUpdateInterval) (ULONG statisticsUpdateInterval) 1042 { 1043 AutoCaller autoCaller (this); 1044 CheckComRCReturnRC (autoCaller.rc()); 1045 1046 AutoLock alock (this); 1047 1048 HRESULT rc = checkStateDependency (MutableStateDep); 1049 CheckComRCReturnRC (rc); 1050 1051 mHWData.backup(); 1052 mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval; 1017 1053 1018 1054 return S_OK; … … 3773 3809 mHWData->mMemoryBalloonSize = memoryBalloonSize; 3774 3810 3811 uint32_t statisticsUpdateInterval = 0; 3812 CFGLDRQueryUInt32 (GuestNode, "StatisticsUpdateInterval", &statisticsUpdateInterval); 3813 mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval; 3814 3775 3815 CFGLDRReleaseNode (GuestNode); 3776 3816 } … … 5456 5496 if (GuestNode) 5457 5497 { 5458 CFGLDRSetUInt32 (GuestNode, "MemoryBalloonSize", mHWData->mMemoryBalloonSize); 5498 CFGLDRSetUInt32 (GuestNode, "MemoryBalloonSize", mHWData->mMemoryBalloonSize); 5499 CFGLDRSetUInt32 (GuestNode, "StatisticsUpdateInterval", mHWData->mStatisticsUpdateInterval); 5459 5500 CFGLDRReleaseNode (GuestNode); 5460 5501 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r4513 r4528 2021 2021 <interface 2022 2022 name="IMachine" extends="$unknown" 2023 uuid=" dcfb87c4-18a9-4a1e-9b1f-6f68f920535b"2023 uuid="2830ce8c-be5b-4660-b8d5-65d913005b4f" 2024 2024 wsmap="managed" 2025 2025 > … … 2175 2175 </attribute> 2176 2176 2177 <attribute name="statisticsUpdateInterval" type="unsigned long"> 2178 <desc>Initial interval to update guest statistics in seconds.</desc> 2179 </attribute> 2180 2177 2181 <attribute name="VRAMSize" type="unsigned long"> 2178 2182 <desc>Video memory size in megabytes.</desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r4513 r4528 222 222 ULONG mMemorySize; 223 223 ULONG mMemoryBalloonSize; 224 ULONG mStatisticsUpdateInterval; 224 225 ULONG mVRAMSize; 225 226 ULONG mMonitorCount; … … 444 445 STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize); 445 446 STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize); 447 STDMETHOD(COMGETTER(StatisticsUpdateInterval))(ULONG *statisticsUpdateInterval); 448 STDMETHOD(COMSETTER(StatisticsUpdateInterval))(ULONG statisticsUpdateInterval); 446 449 STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize); 447 450 STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r4513 r4528 384 384 385 385 <xsd:complexType name="TGuest"> 386 <xsd:attribute name="MemoryBalloonSize" type="xsd:unsignedInt" default="0"/> 386 <xsd:attribute name="MemoryBalloonSize" type="xsd:unsignedInt" default="0"/> 387 <xsd:attribute name="StatisticsInterval" type="xsd:unsignedInt" default="0"/> 387 388 </xsd:complexType> 388 389
Note:
See TracChangeset
for help on using the changeset viewer.