- Timestamp:
- May 7, 2010 4:01:34 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r29220 r29225 208 208 } 209 209 210 STDMETHODIMP Guest::COMGETTER(SharedPagingEnabled) (BOOL *enabled) 211 { 212 return E_NOTIMPL; 213 } 214 215 STDMETHODIMP Guest::COMSETTER(SharedPagingEnabled) (BOOL enabled) 216 { 217 return E_NOTIMPL; 218 } 219 210 220 STDMETHODIMP Guest::COMGETTER(MemoryBalloonSize) (ULONG *aMemoryBalloonSize) 211 221 { … … 274 284 275 285 STDMETHODIMP Guest::InternalGetStatistics(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle, 276 ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, 286 ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared, 277 287 ULONG *aMemCache, ULONG *aPageTotal, 278 ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal )288 ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal) 279 289 { 280 290 CheckComArgOutPointerValid(aCpuUser); … … 284 294 CheckComArgOutPointerValid(aMemFree); 285 295 CheckComArgOutPointerValid(aMemBalloon); 296 CheckComArgOutPointerValid(aMemShared); 286 297 CheckComArgOutPointerValid(aMemCache); 287 298 CheckComArgOutPointerValid(aPageTotal); 299 CheckComArgOutPointerValid(aMemAllocTotal); 300 CheckComArgOutPointerValid(aMemFreeTotal); 301 CheckComArgOutPointerValid(aMemBalloonTotal); 302 CheckComArgOutPointerValid(aMemSharedTotal); 288 303 289 304 AutoCaller autoCaller(this); … … 292 307 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 293 308 294 *aCpuUser = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER];295 *aCpuKernel = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL];296 *aCpuIdle = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE];297 *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K); /* page (4K) -> 1KB units */298 *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K); /* page (4K) -> 1KB units */309 *aCpuUser = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER]; 310 *aCpuKernel = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL]; 311 *aCpuIdle = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE]; 312 *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K); /* page (4K) -> 1KB units */ 313 *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K); /* page (4K) -> 1KB units */ 299 314 *aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] * (_4K/_1K); /* page (4K) -> 1KB units */ 300 *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K); /* page (4K) -> 1KB units */ 301 *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K); /* page (4K) -> 1KB units */ 315 *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K); /* page (4K) -> 1KB units */ 316 *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K); /* page (4K) -> 1KB units */ 317 *aMemShared = 0; /** todo */ 302 318 303 319 Console::SafeVMPtr pVM (mParent); … … 313 329 *aMemFreeTotal = (ULONG)(uFreeTotal / _1K); 314 330 *aMemBalloonTotal = (ULONG)(uBalloonedTotal / _1K); 331 *aMemSharedTotal = 0; /** todo */ 315 332 } 316 333 } -
trunk/src/VBox/Main/MachineImpl.cpp
r29224 r29225 1462 1462 return setError(E_NOTIMPL, tr("Memory ballooning is only supported on 64-bit hosts")); 1463 1463 #endif 1464 } 1465 1466 STDMETHODIMP Machine::COMGETTER(SharedPagingEnabled) (BOOL *enabled) 1467 { 1468 return E_NOTIMPL; 1469 } 1470 1471 STDMETHODIMP Machine::COMSETTER(SharedPagingEnabled) (BOOL enabled) 1472 { 1473 return E_NOTIMPL; 1464 1474 } 1465 1475 -
trunk/src/VBox/Main/Performance.cpp
r28800 r29225 164 164 && iTick != mLastTick) 165 165 { 166 ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal; 167 166 ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal, uMemShared; 167 168 /** todo shared stats. */ 168 169 mGuest->InternalGetStatistics(&mCpuUser, &mCpuKernel, &mCpuIdle, 169 &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache, 170 &mPageTotal, &ulMemAllocTotal, &ulMemFreeTotal, &ulMemBalloonTotal );170 &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache, &uMemShared, 171 &mPageTotal, &ulMemAllocTotal, &ulMemFreeTotal, &ulMemBalloonTotal, &ulMemSharedTotal); 171 172 172 173 if (mHostHAL) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r29218 r29225 4420 4420 </attribute> 4421 4421 4422 <attribute name="SharedPagingEnabled" type="boolean"> 4423 <desc> 4424 This setting determines whether VirtualBox allows page 4425 sharing for this machine (64 bits host only). 4426 </desc> 4427 </attribute> 4428 4422 4429 <attribute name="VRAMSize" type="unsigned long"> 4423 4430 <desc>Video memory size in megabytes.</desc> … … 8564 8571 </attribute> 8565 8572 8573 <attribute name="SharedPagingEnabled" type="boolean"> 8574 <desc> 8575 Flag whether VirtualBox allows page sharing for this machine 8576 (64 bits host only; transient property). 8577 </desc> 8578 </attribute> 8579 8566 8580 <attribute name="statisticsUpdateInterval" type="unsigned long"> 8567 8581 <desc>Interval to update guest statistics in seconds.</desc> … … 8590 8604 <desc>Amount of ballooned physical guest RAM</desc> 8591 8605 </param> 8606 <param name="memShared" type="unsigned long" dir="out"> 8607 <desc>Amount of shared physical guest RAM</desc> 8608 </param> 8592 8609 <param name="memCache" type="unsigned long" dir="out"> 8593 8610 <desc>Total amount of guest (disk) cache memory</desc> … … 8604 8621 <param name="memBalloonTotal" type="unsigned long" dir="out"> 8605 8622 <desc>Total amount of memory ballooned by the hypervisor</desc> 8623 </param> 8624 <param name="memSharedTotal" type="unsigned long" dir="out"> 8625 <desc>Total amount of shared memory in the hypervisor</desc> 8606 8626 </param> 8607 8627 </method> -
trunk/src/VBox/Main/include/GuestImpl.h
r29220 r29225 80 80 STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless); 81 81 STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics); 82 STDMETHOD(COMGETTER(SharedPagingEnabled)) (BOOL *enabled); 83 STDMETHOD(COMSETTER(SharedPagingEnabled)) (BOOL enabled); 82 84 STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize); 83 85 STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize); … … 96 98 STDMETHOD(GetProcessStatus)(ULONG aPID, ULONG *aExitCode, ULONG *aFlags, ULONG *aStatus); 97 99 STDMETHOD(InternalGetStatistics)(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle, 98 ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMem Cache,99 ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal );100 ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared, ULONG *aMemCache, 101 ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal); 100 102 101 103 // public methods that are not in IDL -
trunk/src/VBox/Main/include/MachineImpl.h
r29218 r29225 393 393 STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize); 394 394 STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize); 395 STDMETHOD(COMGETTER(SharedPagingEnabled))(BOOL *enabled); 396 STDMETHOD(COMSETTER(SharedPagingEnabled))(BOOL enabled); 395 397 STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize); 396 398 STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize);
Note:
See TracChangeset
for help on using the changeset viewer.