Changeset 28038 in vbox
- Timestamp:
- Apr 7, 2010 10:09:36 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r28036 r28038 272 272 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 273 273 274 *aCpuUser = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER] ;275 *aCpuKernel = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL] ;276 *aCpuIdle = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE] ;277 *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] ;278 *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] ;279 *aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] ;280 *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] ;281 *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] ;274 *aCpuUser = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER] / (_4K/_1K); /* page (4K) -> 1 KB units */ 275 *aCpuKernel = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL] / (_4K/_1K); 276 *aCpuIdle = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE] / (_4K/_1K); 277 *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] / (_4K/_1K); 278 *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] / (_4K/_1K); 279 *aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] / (_4K/_1K); 280 *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] / (_4K/_1K); 281 *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] / (_4K/_1K); 282 282 283 283 Console::SafeVMPtr pVM (mParent); -
trunk/src/VBox/Main/Performance.cpp
r28036 r28038 433 433 434 434 mGuestHAL->getGuestMemLoad(&ulMemTotal, &ulMemFree, &ulMemBalloon, &ulMemCache, &ulPageTotal); 435 mTotal->put(ulMemTotal * (_1M / _1K)); /* MB -> KB */436 mFree->put(ulMemFree * (_1M / _1K));437 mBallooned->put(ulMemBalloon * (_1M / _1K));438 mCache->put(ulMemCache * (_1M / _1K));439 mPagedTotal->put(ulPageTotal * (_1M / _1K));435 mTotal->put(ulMemTotal); 436 mFree->put(ulMemFree); 437 mBallooned->put(ulMemBalloon); 438 mCache->put(ulMemCache); 439 mPagedTotal->put(ulPageTotal); 440 440 } 441 441 -
trunk/src/VBox/Main/include/Performance.h
r28036 r28038 207 207 } 208 208 209 /** Return guest memory information in MB. */209 /** Return guest memory information in KB. */ 210 210 void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemCache, ULONG *pulPageTotal) 211 211 {
Note:
See TracChangeset
for help on using the changeset viewer.