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

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py

Issue 1145153005: Revert of [Android] Remove adb_commands from telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
index 11acb71ff9390bfbf849619b9548b7865ed559e3..96f08782c077607c71e4cfe091cfd90392672aba 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
@@ -57,14 +57,16 @@
return self._output_file
if self._is_android:
- required_libs = (
+ required_libs = \
android_profiling_helper.GetRequiredLibrariesForVTuneProfile(
- self._output_file))
+ self._output_file)
+ device = self._browser_backend.adb.device()
symfs_root = os.path.dirname(self._output_file)
- android_profiling_helper.CreateSymFs(
- self._browser_backend.device, symfs_root, required_libs,
- use_symlinks=True)
+ android_profiling_helper.CreateSymFs(device,
+ symfs_root,
+ required_libs,
+ use_symlinks=True)
logging.info('Resolving symbols in profile.')
subprocess.call(['amplxe-cl', '-finalize', '-r', self._output_file,
'-search-dir', symfs_root])
@@ -128,8 +130,6 @@
if browser_type.startswith('android'):
# VTune checks if 'su' is available on the device.
- # TODO(jbudorick): Replace with DeviceUtils.HasRoot,
- # DeviceUtils.NeedsSU, or some combination thereof.
proc = subprocess.Popen(['adb', 'shell', 'su', '-c', 'id'],
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)

Powered by Google App Engine
This is Rietveld 408576698