Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: tools/telemetry/telemetry/internal/platform/power_monitor/

Issue 1411843011: [Telemetry] Close msr server win after checking whether platform can monitor power. (Closed) Base URL:
Patch Set: Address Dave's comment Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/platform/power_monitor/
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/ b/tools/telemetry/telemetry/internal/platform/power_monitor/
index 74dac5ca041dded858e875130e6d0763319b1222..ecc83f5f4e49df84aa36940cd1269a1d7d3eb2a6 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/
@@ -133,7 +133,12 @@ class MsrPowerMonitorWin(MsrPowerMonitor):'Cannot monitor power: pre-Sandy Bridge CPU.')
return False
- return self._CheckMSRs()
+ msr_return_value = self._CheckMSRs()
+ # Since _CheckMSRs() starts the MSR server on win platform, we must close
+ # it after checking to avoid leaking msr server process.
+ self._backend.CloseMsrServer()
+ return msr_return_value
def StopMonitoringPower(self):
power_statistics = super(MsrPowerMonitorWin, self).StopMonitoringPower()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698