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

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

Issue 1165463010: [Android] Log exceptions thrown by newly converted DeviceUtils calls in telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 4fc39829c5eff09d3a3704be725ad044d006d1fe..01d95c341631f6358c3c7ecda689c900e6fa52e8 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py
@@ -34,7 +34,11 @@ class _TCMallocHeapProfilerAndroid(object):
def _SetDeviceProperties(self, properties):
device_configured = False
# This profiler requires adb root to set properties.
- self._browser_backend.adb.device().EnableRoot()
+ try:
+ self._browser_backend.adb.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])
if not device_property or not device_property.strip():
@@ -51,8 +55,12 @@ class _TCMallocHeapProfilerAndroid(object):
raise Exception('Device required special config, run again.')
def CollectProfile(self):
- self._browser_backend.adb.device().PullFile(
- self._DEFAULT_DEVICE_DIR, self._output_path)
+ try:
+ self._browser_backend.adb.device().PullFile(
+ self._DEFAULT_DEVICE_DIR, self._output_path)
+ except:
+ logging.exception('New exception caused by DeviceUtils conversion')
+ raise
self._browser_backend.adb.RunShellCommand(
'rm ' + os.path.join(self._DEFAULT_DEVICE_DIR, '*'))
if os.path.exists(self._output_path):

Powered by Google App Engine
This is Rietveld 408576698