Changeset 43453 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Sep 27, 2012 12:37:46 PM (12 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r43445 r43453 443 443 PerformanceCollector *aCollector = m->pParent->performanceCollector(); 444 444 unregisterMetrics (aCollector); 445 HostNetworkInterfaceList::iterator it;446 for (it = m->llNetIfs.begin(); it != m->llNetIfs.end(); ++it)447 (*it)->unregisterMetrics(aCollector, this);448 445 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 446 /* 447 * Note that unregisterMetrics() has unregistered all metrics associated 448 * with Host including network interface ones. We can destroy network 449 * interface objects now. 450 */ 449 451 m->llNetIfs.clear(); 450 452 -
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r43445 r43453 124 124 LogFlowThisFunc(("mInterfaceName={%ls}, mGuid={%s}\n", 125 125 mInterfaceName.raw(), mGuid.toString().c_str())); 126 aCollector->unregisterMetricsFor(objptr); 127 aCollector->unregisterBaseMetricsFor(objptr); 126 Utf8StrFmt name("Net/%ls/Load", mInterfaceName.raw()); 127 aCollector->unregisterMetricsFor(objptr, name + "/*"); 128 aCollector->unregisterBaseMetricsFor(objptr, name); 128 129 } 129 130 -
trunk/src/VBox/Main/src-server/Performance.cpp
r43445 r43453 1140 1140 } 1141 1141 1142 Filter::Filter(const com::Utf8Str name, const ComPtr<IUnknown> &aObject) 1143 { 1144 processMetricList(name, aObject); 1145 } 1146 1142 1147 void Filter::init(ComSafeArrayIn(IN_BSTR, metricNames), 1143 1148 ComSafeArrayIn(IUnknown *, objects)) -
trunk/src/VBox/Main/src-server/PerformanceImpl.cpp
r43445 r43453 599 599 } 600 600 601 void PerformanceCollector::unregisterBaseMetricsFor(const ComPtr<IUnknown> &aObject )601 void PerformanceCollector::unregisterBaseMetricsFor(const ComPtr<IUnknown> &aObject, const Utf8Str name) 602 602 { 603 603 //LogFlowThisFuncEnter(); 604 604 AutoCaller autoCaller(this); 605 605 if (!SUCCEEDED(autoCaller.rc())) return; 606 607 pm::Filter filter(name, aObject); 606 608 607 609 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 609 611 BaseMetricList::iterator it; 610 612 for (it = m.baseMetrics.begin(); it != m.baseMetrics.end(); ++it) 611 if ( (*it)->associatedWith(aObject))613 if (filter.match((*it)->getObject(), (*it)->getName())) 612 614 { 613 615 (*it)->unregister(); … … 619 621 } 620 622 621 void PerformanceCollector::unregisterMetricsFor(const ComPtr<IUnknown> &aObject )623 void PerformanceCollector::unregisterMetricsFor(const ComPtr<IUnknown> &aObject, const Utf8Str name) 622 624 { 623 625 //LogFlowThisFuncEnter(); 624 626 AutoCaller autoCaller(this); 625 627 if (!SUCCEEDED(autoCaller.rc())) return; 628 629 pm::Filter filter(name, aObject); 626 630 627 631 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 629 633 MetricList::iterator it; 630 634 for (it = m.metrics.begin(); it != m.metrics.end();) 631 if ( (*it)->associatedWith(aObject))635 if (filter.match((*it)->getObject(), (*it)->getName())) 632 636 { 633 637 delete *it;
Note:
See TracChangeset
for help on using the changeset viewer.