- Timestamp:
- Jul 8, 2009 1:30:34 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49765
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r20977 r21395 256 256 f3DAccelerationSupported = false; 257 257 258 #if 0 258 259 #ifdef VBOX_WITH_CROGL 259 260 f3DAccelerationSupported = is3DAccelerationSupported(); 260 261 #endif /* VBOX_WITH_CROGL */ 261 262 #endif 262 263 setReady(true); 263 264 return S_OK; -
trunk/src/VBox/Main/HostPower.cpp
r20220 r21395 55 55 LogFunc (("SUSPEND\n")); 56 56 57 #ifdef VBOX_WITH_RESOURCE_USAGE_API 58 /* Suspend performance sampling to avoid unnecessary callbacks due to jumps in time. */ 59 PerformanceCollector *perfcollector = mVirtualBox->performanceCollector(); 60 61 if (perfcollector) 62 perfcollector->suspendSampling(); 63 #endif 57 64 mVirtualBox->getOpenedMachinesAndControls (machines, controls); 58 65 … … 103 110 104 111 LogFunc (("Resumed %d VMs\n", resumed)); 112 113 #ifdef VBOX_WITH_RESOURCE_USAGE_API 114 /* Resume the performance sampling. */ 115 PerformanceCollector *perfcollector = mVirtualBox->performanceCollector(); 116 117 if (perfcollector) 118 perfcollector->resumeSampling(); 119 #endif 105 120 106 121 mConsoles.clear(); -
trunk/src/VBox/Main/PerformanceImpl.cpp
r20826 r21395 522 522 } 523 523 524 void PerformanceCollector::suspendSampling() 525 { 526 AutoCaller autoCaller (this); 527 if (!SUCCEEDED (autoCaller.rc())) return; 528 529 int rc = RTTimerLRStop(m.sampler); 530 AssertRC(rc); 531 } 532 533 void PerformanceCollector::resumeSampling() 534 { 535 AutoCaller autoCaller (this); 536 if (!SUCCEEDED (autoCaller.rc())) return; 537 538 int rc = RTTimerLRStart(m.sampler, 0); 539 AssertRC(rc); 540 } 541 542 524 543 // private methods 525 544 /////////////////////////////////////////////////////////////////////////////// -
trunk/src/VBox/Main/include/PerformanceImpl.h
r19239 r21395 189 189 void unregisterMetricsFor (const ComPtr <IUnknown> &object); 190 190 191 void suspendSampling(); 192 void resumeSampling(); 193 191 194 // public methods for internal purposes only 192 195 // (ensure there is a caller and a read lock before calling them!)
Note:
See TracChangeset
for help on using the changeset viewer.