Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Unified Diff: telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py

Issue 3018563002: Remove Linux MSR power monitoring code (Closed)
Patch Set: Created 3 years, 3 months 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 | « telemetry/telemetry/internal/platform/linux_platform_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py
diff --git a/telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py b/telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py
index 35dcc266d7c9b07b473b3bffd4c474a9e1d8b19b..dfb61a08486562d21dbbbe4b324245c189f318cb 100644
--- a/telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py
+++ b/telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py
@@ -96,32 +96,6 @@ class MsrPowerMonitor(power_monitor.PowerMonitor):
return True
-class MsrPowerMonitorLinux(MsrPowerMonitor):
- def CanMonitorPower(self):
- vendor = None
- family = None
- model = None
- cpuinfo = open('/proc/cpuinfo').read().splitlines()
- for line in cpuinfo:
- if vendor and family and model:
- break
- if line.startswith('vendor_id'):
- vendor = line.split('\t')[1]
- elif line.startswith('cpu family'):
- family = int(line.split(' ')[2])
- elif line.startswith('model\t\t'):
- model = int(line.split(' ')[1])
- if not _IsSandyBridgeOrLater(vendor, family, model):
- logging.info('Cannot monitor power: pre-Sandy Bridge CPU.')
- return False
-
- if not self._CheckMSRs():
- logging.info('Try running tools/telemetry/build/linux_setup_msr.py.')
- return False
-
- return True
-
-
class MsrPowerMonitorWin(MsrPowerMonitor):
def CanMonitorPower(self):
family, model = map(int, re.match(
« no previous file with comments | « telemetry/telemetry/internal/platform/linux_platform_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698