VirtualBox

Changeset 27998 in vbox


Ignore:
Timestamp:
Apr 6, 2010 11:39:20 AM (15 years ago)
Author:
vboxsync
Message:

Dropped Guest/Pagefile/Usage/Free

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

Legend:

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

    r27996 r27998  
    254254STDMETHODIMP Guest::InternalGetStatistics(ULONG aCpuId, ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
    255255                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
    256                                           ULONG *aPageTotal, ULONG *aPageFree)
     256                                          ULONG *aPageTotal)
    257257{
    258258    CheckComArgOutPointerValid(aCpuUser);
     
    264264    CheckComArgOutPointerValid(aMemCache);
    265265    CheckComArgOutPointerValid(aPageTotal);
    266     CheckComArgOutPointerValid(aPageFree);
    267266
    268267    AutoCaller autoCaller(this);
     
    279278    *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE];
    280279    *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL];
    281     *aPageFree = mCurrentGuestStat[GUESTSTATTYPE_PAGEFREE];
    282280
    283281    return S_OK;
  • trunk/src/VBox/Main/MachineImpl.cpp

    r27918 r27998  
    89628962
    89638963    pm::SubMetric *guestPagedTotal = new pm::SubMetric("Guest/Pagefile/Usage/Total",    "Total amount of space in the page file.");
    8964     pm::SubMetric *guestPagedFree = new pm::SubMetric("Guest/Pagefile/Usage/Free",      "Free amount of free space in the page file.");
    89658964
    89668965    /* Create and register base metrics */
     
    89698968
    89708969    pm::BaseMetric *guestCpuMem = new pm::GuestRamUsage(mGuestHAL, aMachine, guestMemTotal, guestMemFree, guestMemBalloon,
    8971                                                         guestMemCache, guestPagedTotal, guestPagedFree);
     8970                                                        guestMemCache, guestPagedTotal);
    89728971    aCollector->registerBaseMetric(guestCpuMem);
    89738972
     
    90119010    aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedTotal, new pm::AggregateMin()));
    90129011    aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedTotal, new pm::AggregateMax()));
    9013 
    9014     aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedFree, 0));
    9015     aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedFree, new pm::AggregateAvg()));
    9016     aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedFree, new pm::AggregateMin()));
    9017     aCollector->registerMetric(new pm::Metric(guestCpuMem, guestPagedFree, new pm::AggregateMax()));
    90189012};
    90199013
  • trunk/src/VBox/Main/Performance.cpp

    r27976 r27998  
    170170        mGuest->InternalGetStatistics(0, &mCpuUser, &mCpuKernel, &mCpuIdle,
    171171                                      &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache,
    172                                       &mPageTotal, &mPageFree);
     172                                      &mPageTotal);
    173173        mLastTick = iTick;
    174174    }
     
    408408    mCache->init(mLength);
    409409    mPagedTotal->init(mLength);
    410     mPagedFree->init(mLength);
    411410}
    412411
     
    418417void GuestRamUsage::collect()
    419418{
    420     ULONG ulMemTotal = 0, ulMemFree = 0, ulMemBalloon = 0, ulMemCache = 0, ulPageTotal = 0, ulPageFree = 0;
    421 
    422     mGuestHAL->getGuestMemLoad(&ulMemTotal, &ulMemFree, &ulMemBalloon, &ulMemCache, &ulPageTotal, &ulPageFree);
     419    ULONG ulMemTotal = 0, ulMemFree = 0, ulMemBalloon = 0, ulMemCache = 0, ulPageTotal = 0;
     420
     421    mGuestHAL->getGuestMemLoad(&ulMemTotal, &ulMemFree, &ulMemBalloon, &ulMemCache, &ulPageTotal);
    423422    mTotal->put(ulMemTotal);
    424423    mFree->put(ulMemFree);
     
    426425    mCache->put(ulMemCache);
    427426    mPagedTotal->put(ulPageTotal);
    428     mPagedFree->put(ulPageFree);
    429427}
    430428
  • trunk/src/VBox/Main/PerformanceImpl.cpp

    r27930 r27998  
    6868    "RAM/Usage/Free:min",
    6969    "RAM/Usage/Free:max",
     70    "Guest/CPU/Load/User",
     71    "Guest/CPU/Load/User:avg",
     72    "Guest/CPU/Load/User:min",
     73    "Guest/CPU/Load/User:max",
     74    "Guest/CPU/Load/Kernel",
     75    "Guest/CPU/Load/Kernel:avg",
     76    "Guest/CPU/Load/Kernel:min",
     77    "Guest/CPU/Load/Kernel:max",
     78    "Guest/CPU/Load/Idle",
     79    "Guest/CPU/Load/Idle:avg",
     80    "Guest/CPU/Load/Idle:min",
     81    "Guest/CPU/Load/Idle:max",
    7082    "Guest/RAM/Usage/Total",
    7183    "Guest/RAM/Usage/Total:avg",
     
    88100    "Guest/Pagefile/Usage/Total:min",
    89101    "Guest/Pagefile/Usage/Total:max",
    90     "Guest/Pagefile/Usage/Free",
    91     "Guest/Pagefile/Usage/Free:avg",
    92     "Guest/Pagefile/Usage/Free:min",
    93     "Guest/Pagefile/Usage/Free:max",
    94102};
    95103
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r27996 r27998  
    82718271  <interface
    82728272    name="IGuestOSType" extends="$unknown"
    8273     uuid="3fcf2078-3c69-45ca-bd5c-79c3e3c15362"
     8273    uuid="8cec1502-8869-42e3-9d9c-45f0d1bb0861"
    82748274    wsmap="struct"
    82758275  >
     
    84528452      <param name="pagedTotal" type="unsigned long" dir="out">
    84538453         <desc>Total amount of space in the page file</desc>
    8454       </param>
    8455       <param name="pagedFree" type="unsigned long" dir="out">
    8456          <desc>Free amount of space in the page file</desc>
    84578454      </param>
    84588455    </method>
  • trunk/src/VBox/Main/include/GuestImpl.h

    r27996 r27998  
    9090    STDMETHOD(InternalGetStatistics)(ULONG aCpuId, ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
    9191                                     ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
    92                                      ULONG *aPageTotal, ULONG *aPageFree);
     92                                     ULONG *aPageTotal);
    9393
    9494    // public methods that are not in IDL
  • trunk/src/VBox/Main/include/Performance.h

    r27942 r27998  
    168168        CollectorGuestHAL(Machine *machine) : cEnabled(0), mMachine(machine), mConsole(NULL), mGuest(NULL), mLastTick(0),
    169169                                              mCpuUser(0), mCpuKernel(0), mCpuIdle(0), mMemTotal(0), mMemFree(0), mMemBalloon(0),
    170                                               mMemCache(0), mPageTotal(0), mPageFree(0) {};
     170                                              mMemCache(0), mPageTotal(0) {};
    171171        ~CollectorGuestHAL();
    172172
     
    187187
    188188        /** Return guest memory information in kb. */
    189         void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemCache, ULONG *pulPageTotal, ULONG *pulPageFree)
     189        void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemCache, ULONG *pulPageTotal)
    190190        {
    191191            *pulMemTotal   = mMemTotal;
     
    194194            *pulMemCache   = mMemCache;
    195195            *pulPageTotal  = mPageTotal;
    196             *pulPageFree   = mPageFree;
    197196        }
    198197
     
    213212        ULONG                mMemCache;
    214213        ULONG                mPageTotal;
    215         ULONG                mPageFree;
    216214    };
    217215
     
    414412    {
    415413    public:
    416         GuestRamUsage(CollectorGuestHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *free, SubMetric *balloon, SubMetric *cache, SubMetric *pagedtotal, SubMetric *pagedfree)
    417         : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mFree(free), mBallooned(balloon), mCache(cache), mPagedTotal(pagedtotal), mPagedFree(pagedfree), mGuestHAL(hal) {};
    418         ~GuestRamUsage() { delete mTotal; delete mFree; delete mBallooned; delete mCache; delete mPagedTotal; delete mPagedFree; };
     414        GuestRamUsage(CollectorGuestHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *free, SubMetric *balloon, SubMetric *cache, SubMetric *pagedtotal)
     415        : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mFree(free), mBallooned(balloon), mCache(cache), mPagedTotal(pagedtotal), mGuestHAL(hal) {};
     416        ~GuestRamUsage() { delete mTotal; delete mFree; delete mBallooned; delete mCache; delete mPagedTotal; };
    419417
    420418        void init(ULONG period, ULONG length);
     
    426424        ULONG getScale() { return 1; }
    427425    private:
    428         SubMetric *mTotal, *mFree, *mBallooned, *mCache, *mPagedTotal, *mPagedFree;
     426        SubMetric *mTotal, *mFree, *mBallooned, *mCache, *mPagedTotal;
    429427        CollectorGuestHAL *mGuestHAL;
    430428    };
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