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

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_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/tcmalloc_heap_profiler.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
index 8c67284f58fb36eac26f08fb21c9d047a38ff340..4fc39829c5eff09d3a3704be725ad044d006d1fe 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
@@ -34,26 +34,26 @@
def _SetDeviceProperties(self, properties):
device_configured = False
# This profiler requires adb root to set properties.
- self._browser_backend.device.EnableRoot()
+ self._browser_backend.adb.device().EnableRoot()
for values in properties.itervalues():
- device_property = self._browser_backend.device.GetProp(values[0])
+ device_property = self._browser_backend.adb.device().GetProp(values[0])
if not device_property or not device_property.strip():
- self._browser_backend.device.SetProp(values[0], values[1])
+ self._browser_backend.adb.device().SetProp(values[0], values[1])
device_configured = True
- if not self._browser_backend.device.FileExists(
+ if not self._browser_backend.adb.device().FileExists(
self._DEFAULT_DEVICE_DIR):
- self._browser_backend.device.RunShellCommand(
+ self._browser_backend.adb.RunShellCommand(
'mkdir -p ' + self._DEFAULT_DEVICE_DIR)
- self._browser_backend.device.RunShellCommand(
+ self._browser_backend.adb.RunShellCommand(
'chmod 777 ' + self._DEFAULT_DEVICE_DIR)
device_configured = True
if device_configured:
raise Exception('Device required special config, run again.')
def CollectProfile(self):
- self._browser_backend.device.PullFile(
+ self._browser_backend.adb.device().PullFile(
self._DEFAULT_DEVICE_DIR, self._output_path)
- self._browser_backend.device.RunShellCommand(
+ self._browser_backend.adb.RunShellCommand(
'rm ' + os.path.join(self._DEFAULT_DEVICE_DIR, '*'))
if os.path.exists(self._output_path):
logging.info('TCMalloc dumps pulled to %s', self._output_path)

Powered by Google App Engine
This is Rietveld 408576698