| Index: tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py
|
| diff --git a/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py
|
| index 4906cf89cdf598a716afe1ec8016a207b7fbe4f2..96c065223302eb55dc5b0cd6eb2b489df1959857 100644
|
| --- a/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py
|
| +++ b/tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py
|
| @@ -80,15 +80,16 @@ class _SingleProcessPerfProfiler(object):
|
| cmd_prefix = []
|
| perf_args = ['record', '--pid', str(pid)]
|
| if self._is_android:
|
| - cmd_prefix = ['adb', '-s', browser_backend.adb.device_serial(), 'shell',
|
| - perf_binary]
|
| + cmd_prefix = ['adb', '-s', browser_backend.device.adb.GetDeviceSerial(),
|
| + 'shell', perf_binary]
|
| perf_args += _PERF_OPTIONS_ANDROID
|
| output_file = os.path.join('/sdcard', 'perf_profiles',
|
| os.path.basename(output_file))
|
| self._device_output_file = output_file
|
| - browser_backend.adb.RunShellCommand(
|
| + browser_backend.device.RunShellCommand(
|
| 'mkdir -p ' + os.path.dirname(self._device_output_file))
|
| - browser_backend.adb.RunShellCommand('rm -f ' + self._device_output_file)
|
| + browser_backend.device.RunShellCommand(
|
| + 'rm -f ' + self._device_output_file)
|
| else:
|
| cmd_prefix = [perf_binary]
|
| perf_args += ['--output', output_file] + _PERF_OPTIONS
|
| @@ -103,7 +104,7 @@ class _SingleProcessPerfProfiler(object):
|
| 'To collect a full profile rerun with '
|
| '"--extra-browser-args=--single-process"')
|
| if self._is_android:
|
| - device = self._browser_backend.adb.device()
|
| + device = self._browser_backend.device
|
| try:
|
| binary_name = os.path.basename(self._perf_binary)
|
| device.KillAll(binary_name, signum=signal.SIGINT, blocking=True)
|
| @@ -127,7 +128,7 @@ Try rerunning this script under sudo or setting
|
| cmd = '%s report -n -i %s' % (_NicePath(self._perfhost_binary),
|
| self._output_file)
|
| if self._is_android:
|
| - device = self._browser_backend.adb.device()
|
| + device = self._browser_backend.device
|
| try:
|
| device.PullFile(self._device_output_file, self._output_file)
|
| except:
|
| @@ -177,7 +178,7 @@ class PerfProfiler(profiler.Profiler):
|
| perf_binary = perfhost_binary = _InstallPerfHost()
|
| try:
|
| if platform_backend.GetOSName() == 'android':
|
| - device = browser_backend.adb.device()
|
| + device = browser_backend.device
|
| perf_binary = android_profiling_helper.PrepareDeviceForPerf(device)
|
| self._perf_control = perf_control.PerfControl(device)
|
| self._perf_control.SetPerfProfilingMode()
|
|
|