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

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

Issue 1232683002: Fix adb usage in tools/telemetry/telemetry/core/platform/profiler after https://codereview.chromium… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87ef10e0213ba99c5af7ec62c575832cac8eb298..98b5f3c56c3d09bd1bae53ca49d8ec2f4e7d0592 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
@@ -35,20 +35,20 @@ class _TCMallocHeapProfilerAndroid(object):
device_configured = False
# This profiler requires adb root to set properties.
try:
- self._browser_backend.adb.device().EnableRoot()
+ self._browser_backend.device.EnableRoot()
except:
logging.exception('New exception caused by DeviceUtils conversion')
raise
for values in properties.itervalues():
- device_property = self._browser_backend.adb.device().GetProp(values[0])
+ device_property = self._browser_backend.device.GetProp(values[0])
if not device_property or not device_property.strip():
- self._browser_backend.adb.device().SetProp(values[0], values[1])
+ self._browser_backend.device.SetProp(values[0], values[1])
device_configured = True
- if not self._browser_backend.adb.device().FileExists(
+ if not self._browser_backend.device.FileExists(
self._DEFAULT_DEVICE_DIR):
- self._browser_backend.adb.RunShellCommand(
+ self._browser_backend.device.RunShellCommand(
'mkdir -p ' + self._DEFAULT_DEVICE_DIR)
- self._browser_backend.adb.RunShellCommand(
+ self._browser_backend.device.RunShellCommand(
'chmod 777 ' + self._DEFAULT_DEVICE_DIR)
device_configured = True
if device_configured:
@@ -56,12 +56,12 @@ class _TCMallocHeapProfilerAndroid(object):
def CollectProfile(self):
try:
- self._browser_backend.adb.device().PullFile(
+ self._browser_backend.device.PullFile(
self._DEFAULT_DEVICE_DIR, self._output_path)
except:
logging.exception('New exception caused by DeviceUtils conversion')
raise
- self._browser_backend.adb.RunShellCommand(
+ self._browser_backend.device.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)
« no previous file with comments | « tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698