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

Unified Diff: telemetry/telemetry/internal/platform/linux_platform_backend.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 | « no previous file | telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/platform/linux_platform_backend.py
diff --git a/telemetry/telemetry/internal/platform/linux_platform_backend.py b/telemetry/telemetry/internal/platform/linux_platform_backend.py
index b266c9479af057f014b1a8d31d230debc54cd255..8f0178ced0974351d11b095cf0bc8eb054460dd6 100644
--- a/telemetry/telemetry/internal/platform/linux_platform_backend.py
+++ b/telemetry/telemetry/internal/platform/linux_platform_backend.py
@@ -16,7 +16,6 @@ from telemetry.core import util
from telemetry import decorators
from telemetry.internal.platform import linux_based_platform_backend
from telemetry.internal.platform import posix_platform_backend
-from telemetry.internal.platform.power_monitor import msr_power_monitor
_POSSIBLE_PERFHOST_APPLICATIONS = [
@@ -30,7 +29,6 @@ class LinuxPlatformBackend(
linux_based_platform_backend.LinuxBasedPlatformBackend):
def __init__(self):
super(LinuxPlatformBackend, self).__init__()
- self._power_monitor = msr_power_monitor.MsrPowerMonitorLinux(self)
@classmethod
def IsPlatformBackendForHost(cls):
@@ -100,31 +98,10 @@ class LinuxPlatformBackend(
'Please teach Telemetry how to install ' + application)
def CanMonitorPower(self):
- # TODO(charliea): This is a stopgap until all desktop power monitoring code
- # can be removed. (crbug.com/763263)
return False
def CanMeasurePerApplicationPower(self):
- return self._power_monitor.CanMeasurePerApplicationPower()
-
- def StartMonitoringPower(self, browser):
- self._power_monitor.StartMonitoringPower(browser)
-
- def StopMonitoringPower(self):
- return self._power_monitor.StopMonitoringPower()
-
- def ReadMsr(self, msr_number, start=0, length=64):
- cmd = ['rdmsr', '-d', str(msr_number)]
- (out, err) = subprocess.Popen(cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()
- if err:
- raise OSError(err)
- try:
- result = int(out)
- except ValueError:
- raise OSError('Cannot interpret rdmsr output: %s' % out)
- return result >> start & ((1 << length) - 1)
+ return False
def _IsIpfwKernelModuleInstalled(self):
return 'ipfw_mod' in subprocess.Popen(
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698