| 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))
|
|
|