VirtualBox

Changeset 29225 in vbox for trunk/src


Ignore:
Timestamp:
May 7, 2010 4:01:34 PM (15 years ago)
Author:
vboxsync
Message:

Shared paging property for IMachine and IGuest added (not implemented).

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r29220 r29225  
    208208}
    209209
     210STDMETHODIMP Guest::COMGETTER(SharedPagingEnabled) (BOOL *enabled)
     211{
     212    return E_NOTIMPL;
     213}
     214
     215STDMETHODIMP Guest::COMSETTER(SharedPagingEnabled) (BOOL enabled)
     216{
     217    return E_NOTIMPL;
     218}
     219
    210220STDMETHODIMP Guest::COMGETTER(MemoryBalloonSize) (ULONG *aMemoryBalloonSize)
    211221{
     
    274284
    275285STDMETHODIMP Guest::InternalGetStatistics(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
    276                                           ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon,
     286                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared,
    277287                                          ULONG *aMemCache, ULONG *aPageTotal,
    278                                           ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal)
     288                                          ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal)
    279289{
    280290    CheckComArgOutPointerValid(aCpuUser);
     
    284294    CheckComArgOutPointerValid(aMemFree);
    285295    CheckComArgOutPointerValid(aMemBalloon);
     296    CheckComArgOutPointerValid(aMemShared);
    286297    CheckComArgOutPointerValid(aMemCache);
    287298    CheckComArgOutPointerValid(aPageTotal);
     299    CheckComArgOutPointerValid(aMemAllocTotal);
     300    CheckComArgOutPointerValid(aMemFreeTotal);
     301    CheckComArgOutPointerValid(aMemBalloonTotal);
     302    CheckComArgOutPointerValid(aMemSharedTotal);
    288303
    289304    AutoCaller autoCaller(this);
     
    292307    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    293308
    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 */
    299314    *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 */
    302318
    303319    Console::SafeVMPtr pVM (mParent);
     
    313329            *aMemFreeTotal    = (ULONG)(uFreeTotal / _1K);
    314330            *aMemBalloonTotal = (ULONG)(uBalloonedTotal / _1K);
     331            *aMemSharedTotal  = 0; /** todo */
    315332        }
    316333    }
  • trunk/src/VBox/Main/MachineImpl.cpp

    r29224 r29225  
    14621462    return setError(E_NOTIMPL, tr("Memory ballooning is only supported on 64-bit hosts"));
    14631463#endif
     1464}
     1465
     1466STDMETHODIMP Machine::COMGETTER(SharedPagingEnabled) (BOOL *enabled)
     1467{
     1468    return E_NOTIMPL;
     1469}
     1470
     1471STDMETHODIMP Machine::COMSETTER(SharedPagingEnabled) (BOOL enabled)
     1472{
     1473    return E_NOTIMPL;
    14641474}
    14651475
  • trunk/src/VBox/Main/Performance.cpp

    r28800 r29225  
    164164        &&  iTick != mLastTick)
    165165    {
    166         ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal;
    167 
     166        ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal, uMemShared;
     167
     168        /** todo shared stats. */
    168169        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);
    171172
    172173        if (mHostHAL)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r29218 r29225  
    44204420    </attribute>
    44214421
     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
    44224429    <attribute name="VRAMSize" type="unsigned long">
    44234430      <desc>Video memory size in megabytes.</desc>
     
    85648571    </attribute>
    85658572
     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
    85668580    <attribute name="statisticsUpdateInterval" type="unsigned long">
    85678581      <desc>Interval to update guest statistics in seconds.</desc>
     
    85908604         <desc>Amount of ballooned physical guest RAM</desc>
    85918605      </param>
     8606      <param name="memShared" type="unsigned long" dir="out">
     8607        <desc>Amount of shared physical guest RAM</desc>
     8608      </param>
    85928609      <param name="memCache" type="unsigned long" dir="out">
    85938610         <desc>Total amount of guest (disk) cache memory</desc>
     
    86048621      <param name="memBalloonTotal" type="unsigned long" dir="out">
    86058622         <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>
    86068626      </param>
    86078627    </method>
  • trunk/src/VBox/Main/include/GuestImpl.h

    r29220 r29225  
    8080    STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
    8181    STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
     82    STDMETHOD(COMGETTER(SharedPagingEnabled)) (BOOL *enabled);
     83    STDMETHOD(COMSETTER(SharedPagingEnabled)) (BOOL enabled);
    8284    STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
    8385    STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
     
    9698    STDMETHOD(GetProcessStatus)(ULONG aPID, ULONG *aExitCode, ULONG *aFlags, ULONG *aStatus);
    9799    STDMETHOD(InternalGetStatistics)(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
    98                                      ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
    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);
    100102
    101103    // public methods that are not in IDL
  • trunk/src/VBox/Main/include/MachineImpl.h

    r29218 r29225  
    393393    STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize);
    394394    STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize);
     395    STDMETHOD(COMGETTER(SharedPagingEnabled))(BOOL *enabled);
     396    STDMETHOD(COMSETTER(SharedPagingEnabled))(BOOL enabled);
    395397    STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize);
    396398    STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette