From b51cfab22d3a5f2c175f56a1d20a557644aa1297 Mon Sep 17 00:00:00 2001 From: "epenner@chromium.org" Date: Fri, 20 Jun 2014 22:33:25 +0000 Subject: Telemetry: Set scaling governor on all cpus (on all devices) We try to set the scaling governor for all CPU cores, but this doesn't work SOCs that dynamically disable cores entirely (ie. Qualcomm). Since this only happens on Qcomm, this patch stops the 'mpdecision' process on Qualcomm, which makes it behave like other devices. PERF-SHERIFFS: This may improve metrics for the better given all cores are in 'performance' mode now. It should hopefully reduce noise, since a different number of cores might have had 'performance' set on each run, and any code that runs on a non-performance core will suffer from noisy timings/rates. Example: Tough-compositor-cases std-dev went from 0.25ms to 0.04ms with this change. BUG=383566 Review URL: https://codereview.chromium.org/338233003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278837 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/android/adb_profile_chrome/perf_controller.py | 4 ++-- tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/android/adb_profile_chrome/perf_controller.py b/tools/android/adb_profile_chrome/perf_controller.py index 523fb85..aeb29fd 100644 --- a/tools/android/adb_profile_chrome/perf_controller.py +++ b/tools/android/adb_profile_chrome/perf_controller.py @@ -58,7 +58,7 @@ class _PerfProfiler(object): if categories: cmd += ['--event', ','.join(categories)] self._perf_control = perf_control.PerfControl(self._device) - self._perf_control.ForceAllCpusOnline(True) + self._perf_control.SetPerfProfilingMode() self._perf_process = subprocess.Popen(cmd, stdout=self._log_file, stderr=subprocess.STDOUT) @@ -67,7 +67,7 @@ class _PerfProfiler(object): perf_pids = self._device.old_interface.ExtractPid('perf') self._device.RunShellCommand('kill -SIGINT ' + ' '.join(perf_pids)) self._perf_process.wait() - self._perf_control.ForceAllCpusOnline(False) + self._perf_control.SetDefaultPerfMode() def _FailWithLog(self, msg): self._log_file.seek(0) diff --git a/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py index 6b460d9..139cd37 100644 --- a/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py +++ b/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py @@ -172,7 +172,7 @@ class PerfProfiler(profiler.Profiler): device = browser_backend.adb.device() perf_binary = android_profiling_helper.PrepareDeviceForPerf(device) self._perf_control = perf_control.PerfControl(device) - self._perf_control.ForceAllCpusOnline(True) + self._perf_control.SetPerfProfilingMode() else: _PrepareHostForPerf() @@ -185,7 +185,7 @@ class PerfProfiler(profiler.Profiler): perf_binary, perfhost_binary)) except: if self._is_android: - self._perf_control.ForceAllCpusOnline(False) + self._perf_control.SetDefaultPerfMode() raise @classmethod @@ -209,7 +209,7 @@ class PerfProfiler(profiler.Profiler): def CollectProfile(self): if self._is_android: - self._perf_control.ForceAllCpusOnline(False) + self._perf_control.SetDefaultPerfMode() output_files = [] for single_process in self._process_profilers: output_files.append(single_process.CollectProfile()) -- cgit v1.1