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

Unified Diff: tools/memory_inspector/memory_inspector/backends/android/android_backend.py

Issue 563183003: [Android] memory_inspector: add resident memory accounting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mi4
Patch Set: Created 6 years, 3 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 | « no previous file | tools/memory_inspector/memory_inspector/backends/android/android_backend_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/memory_inspector/memory_inspector/backends/android/android_backend.py
diff --git a/tools/memory_inspector/memory_inspector/backends/android/android_backend.py b/tools/memory_inspector/memory_inspector/backends/android/android_backend.py
index e35e12d55fbd1fa82ecccaaa98d640b492ed5efe..c7cfe816d3f7e4f747120f735bcdd5fbd4902d47 100644
--- a/tools/memory_inspector/memory_inspector/backends/android/android_backend.py
+++ b/tools/memory_inspector/memory_inspector/backends/android/android_backend.py
@@ -124,6 +124,8 @@ class AndroidBackend(backends.Backend):
exec_file_name = posixpath.basename(exec_file_rel_path)
if exec_file_rel_path.startswith('/'):
exec_file_rel_path = exec_file_rel_path[1:]
+ if not exec_file_rel_path:
+ continue
exec_file_abs_path = ''
for sym_path in sym_paths:
# First try to locate the symbol file following the full relative path
@@ -145,7 +147,7 @@ class AndroidBackend(backends.Backend):
if os.path.exists(exec_file_abs_path):
break
- if not os.path.exists(exec_file_abs_path):
+ if not os.path.isfile(exec_file_abs_path):
continue
symbolizer = elf_symbolizer.ELFSymbolizer(
@@ -177,8 +179,9 @@ class AndroidDevice(backends.Device):
backend=backend,
settings=backends.Settings(AndroidDevice._SETTINGS_KEYS))
self.adb = adb
+ self._name = '%s %s' % (adb.GetProp('ro.product.model'),
+ adb.GetProp('ro.build.id'))
self._id = str(adb)
- self._name = adb.GetProp('ro.product.model')
self._sys_stats = None
self._last_device_stats = None
self._sys_stats_last_update = None
« no previous file with comments | « no previous file | tools/memory_inspector/memory_inspector/backends/android/android_backend_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698