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

Unified Diff: build/android/pylib/android_commands.py

Issue 12212137: Android: further "user build" perf test automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds instrumentation perf Created 7 years, 10 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 | build/android/pylib/instrumentation/run_java_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 55b3fd6c04e7e306d963dab4ca01070f77e3942f..1c102f1774c140ab29c7309dfc87582b4cf32dc3 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -1059,7 +1059,8 @@ class AndroidCommands(object):
usage_dict = collections.defaultdict(int)
smaps = collections.defaultdict(dict)
current_smap = ''
- for line in self.GetFileContents('/proc/%s/smaps' % pid, log_result=False):
+ for line in self.GetProtectedFileContents('/proc/%s/smaps' % pid,
+ log_result=False):
items = line.split()
# See man 5 proc for more details. The format is:
# address perms offset dev inode pathname
@@ -1079,8 +1080,8 @@ class AndroidCommands(object):
# Presumably the process died between ps and calling this method.
logging.warning('Could not find memory usage for pid ' + str(pid))
- for line in self.GetFileContents('/d/nvmap/generic-0/clients',
- log_result=False):
+ for line in self.GetProtectedFileContents('/d/nvmap/generic-0/clients',
+ log_result=False):
match = re.match(NVIDIA_MEMORY_INFO_RE, line)
if match and match.group('pid') == pid:
usage_bytes = int(match.group('usage_bytes'))
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/run_java_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698