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

Unified Diff: tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py

Issue 1242943005: [Android] Support idle wakeup measurement with /proc/timer_stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working test Created 5 years, 5 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
Index: tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
diff --git a/tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py b/tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
index f22b7bae3e21d4bd2ad183dc222c529083a20046..9ff75197d3a1f47c969f045c2d3238a9db06933f 100644
--- a/tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
+++ b/tools/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
@@ -110,6 +110,12 @@ class LinuxBasedPlatformBackend(platform_backend.PlatformBackend):
"""
raise NotImplementedError()
+ def StartMeasuringIdleWakeUps(self):
+ self._EnableTimerStatsCollection(True)
+
+ def StopMeasuringIdleWakeUps(self):
+ self._EnableTimerStatsCollection(False)
+
@staticmethod
def ParseCStateSample(sample):
"""Parse a single c-state residency sample.
@@ -130,6 +136,11 @@ class LinuxBasedPlatformBackend(platform_backend.PlatformBackend):
assert pid, 'pid is required'
return bool(self.GetPsOutput(['pid'], pid) == str(pid))
+ def _EnableTimerStatsCollection(self, enable):
+ """Writes to /proc/timer_stats to start/stop measuring process wakeups."""
+ # TODO(thestig) Implement on Linux and CrOS.
+ raise NotImplementedError()
+
def _GetProcFileForPid(self, pid, filename):
try:
return self.GetFileContents('/proc/%s/%s' % (pid, filename))

Powered by Google App Engine
This is Rietveld 408576698