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

Side by Side Diff: build/android/pylib/perf/perf_control.py

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appeasing windows Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 6
7 from pylib import android_commands 7 from pylib import android_commands
8 from pylib.device import device_utils 8 from pylib.device import device_utils
9 9
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 measurement is started. 83 measurement is started.
84 - The scaling governor can't be set for an offline CPU and frequency scaling 84 - The scaling governor can't be set for an offline CPU and frequency scaling
85 on newly enabled CPUs adds noise to both perf and tracing measurements. 85 on newly enabled CPUs adds noise to both perf and tracing measurements.
86 86
87 It appears Qualcomm is the only vendor that hot-plugs CPUs, and on Qualcomm 87 It appears Qualcomm is the only vendor that hot-plugs CPUs, and on Qualcomm
88 this is done by "mpdecision". 88 this is done by "mpdecision".
89 89
90 """ 90 """
91 if self._have_mpdecision: 91 if self._have_mpdecision:
92 script = 'stop mpdecision' if force_online else 'start mpdecision' 92 script = 'stop mpdecision' if force_online else 'start mpdecision'
93 self._device.RunShellCommand(script, root=True) 93 self._device.RunShellCommand(script, as_root=True)
94 94
95 if not self._have_mpdecision and not self._AllCpusAreOnline(): 95 if not self._have_mpdecision and not self._AllCpusAreOnline():
96 logging.warning('Unexpected cpu hot plugging detected.') 96 logging.warning('Unexpected cpu hot plugging detected.')
97 97
98 if not force_online: 98 if not force_online:
99 return 99 return
100 100
101 for cpu in range(self._num_cpu_cores): 101 for cpu in range(self._num_cpu_cores):
102 online_path = PerfControl._CPU_ONLINE_FMT % cpu 102 online_path = PerfControl._CPU_ONLINE_FMT % cpu
103 self._device.old_interface.SetProtectedFileContents( 103 self._device.old_interface.SetProtectedFileContents(
104 online_path, '1') 104 online_path, '1')
OLDNEW
« no previous file with comments | « build/android/pylib/perf/cache_control.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698