Chromium Code Reviews| Index: tools/profile_chrome/perf_controller.py |
| diff --git a/tools/profile_chrome/perf_controller.py b/tools/profile_chrome/perf_controller.py |
| index 06992cfd134bfb3ba9de1f099418492db80de3c3..37d2e4bde71814283c5a271564f6522d66cf9c2b 100644 |
| --- a/tools/profile_chrome/perf_controller.py |
| +++ b/tools/profile_chrome/perf_controller.py |
| @@ -12,9 +12,9 @@ import tempfile |
| from profile_chrome import controllers |
| from profile_chrome import ui |
| -from pylib import android_commands |
| from pylib import constants |
| from pylib.perf import perf_control |
| +from pylib.utils import device_temp_file |
| sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, |
| 'tools', |
| @@ -47,16 +47,13 @@ _PERF_OPTIONS = [ |
| class _PerfProfiler(object): |
| def __init__(self, device, perf_binary, categories): |
| self._device = device |
| - self._output_file = android_commands.DeviceTempFile( |
| - self._device.old_interface, prefix='perf_output') |
| + self._output_file = device_temp_file.DeviceTempFile( |
| + self._device.adb, prefix='perf_output') |
| self._log_file = tempfile.TemporaryFile() |
| - |
| - # TODO(jbudorick) Look at providing a way to unhandroll this once the |
| - # adb rewrite has fully landed. |
| - device_param = (['-s', str(self._device)] if str(self._device) else []) |
| - cmd = ['adb'] + device_param + \ |
| - ['shell', perf_binary, 'record', |
| - '--output', self._output_file.name] + _PERF_OPTIONS |
| + self._device.RunShellCommand( |
|
Sami
2015/05/12 18:37:10
This command should still be run asynchronously by
jbudorick
2015/05/13 03:21:22
Ah, that's the part I missed. Reverted.
Also, thi
Sami
2015/05/13 12:58:50
Yeah this is pretty bad. Maybe there's a cleaner A
jbudorick
2015/05/13 21:49:28
Perhaps. Both telemetry and the video recorder bot
|
| + [perf_binary, 'record', '--output', self._output_file.name] + |
| + _PERF_OPTIONS, |
| + check_return=True) |
| if categories: |
| cmd += ['--event', ','.join(categories)] |
| self._perf_control = perf_control.PerfControl(self._device) |