VirtualBox

Changeset 11357 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 12, 2008 2:02:08 PM (16 years ago)
Author:
vboxsync
Message:

PerfAPI: Important! VM metrics are now associated with Machine instead of SessionMachine.

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

Legend:

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

    r11108 r11357  
    75797579
    75807580#ifdef VBOX_WITH_RESOURCE_USAGE_API
    7581 void Machine::registerMetrics (PerformanceCollector *aCollector, RTPROCESS pid)
     7581void Machine::registerMetrics (PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid)
    75827582{
    75837583    pm::MetricFactory *metricFactory = aCollector->getMetricFactory();
     
    75897589    IUnknown *objptr;
    75907590
    7591     ComObjPtr<Machine> tmp = this;
     7591    ComObjPtr<Machine> tmp = aMachine;
    75927592    tmp.queryInterfaceTo (&objptr);
    75937593    pm::BaseMetric *cpuLoad =
     
    78457845
    78467846#ifdef VBOX_WITH_RESOURCE_USAGE_API
    7847     registerMetrics (mParent->performanceCollector(), mData->mSession.mPid);
     7847    registerMetrics (mParent->performanceCollector(), aMachine, mData->mSession.mPid);
    78487848#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    78497849
  • trunk/src/VBox/Main/include/MachineImpl.h

    r11083 r11357  
    736736
    737737#ifdef VBOX_WITH_RESOURCE_USAGE_API
    738     void registerMetrics (PerformanceCollector *aCollector, RTPROCESS pid);
     738    void registerMetrics (PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid);
    739739    void unregisterMetrics (PerformanceCollector *aCollector);
    740740#endif /* VBOX_WITH_RESOURCE_USAGE_API */
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r11182 r11357  
    966966        com::SafeIfaceArray<IUnknown> objects(2);
    967967        host.queryInterfaceTo(&objects[0]);
    968         sessionMachine.queryInterfaceTo(&objects[1]);
     968        machine.queryInterfaceTo(&objects[1]);
    969969        CHECK_ERROR_BREAK (collector, SetupMetrics(ComSafeArrayAsInParam(baseMetrics),
    970970                                                   ComSafeArrayAsInParam(objects), 1u, 10u) );
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