Index: build/android/pylib/device/device_utils.py |
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py |
index f7167cea13a20e9401ff03556d1b4e49b8bddfb2..419740b7883955f578101f52ebc594dbcbb5cb86 100644 |
--- a/build/android/pylib/device/device_utils.py |
+++ b/build/android/pylib/device/device_utils.py |
@@ -593,7 +593,7 @@ class DeviceUtils(object): |
CommandTimeoutError on timeout. |
DeviceUnreachableError on missing device. |
""" |
- pids = self._GetPidsImpl(process_name) |
+ pids = self.GetPids(process_name) |
if not pids: |
raise device_errors.CommandFailedError( |
'No process "%s"' % process_name, str(self)) |
@@ -603,7 +603,7 @@ class DeviceUtils(object): |
if blocking: |
wait_period = 0.1 |
- while self._GetPidsImpl(process_name): |
+ while self.GetPids(process_name): |
time.sleep(wait_period) |
return len(pids) |
@@ -1020,7 +1020,8 @@ class DeviceUtils(object): |
if size is None or size <= self._MAX_ADB_OUTPUT_LENGTH: |
return _JoinLines(self.RunShellCommand( |
- ['cat', device_path], as_root=as_root, check_return=True)) |
+ ['cat', device_path], as_root=as_root, check_return=True, |
+ large_output=(not bool(size)))) |
perezju
2015/04/13 09:58:32
I don't think this makes much sense, and introduce
rnephew (Wrong account)
2015/04/13 17:21:04
In at least the /proc/ fs on the device, and proba
jbudorick
2015/04/13 17:44:29
This doesn't make much sense because what it's rea
|
elif as_root and self.NeedsSU(): |
with device_temp_file.DeviceTempFile(self.adb) as device_temp: |
self.RunShellCommand(['cp', device_path, device_temp.name], |
@@ -1353,11 +1354,9 @@ class DeviceUtils(object): |
CommandTimeoutError on timeout. |
DeviceUnreachableError on missing device. |
""" |
- return self._GetPidsImpl(process_name) |
- |
- def _GetPidsImpl(self, process_name): |
procs_pids = {} |
- for line in self.RunShellCommand('ps', check_return=True): |
+ for line in self.RunShellCommand('ps', check_return=True, |
+ large_output=True): |
perezju
2015/04/13 09:58:32
This is precisely one of the things I really think
jbudorick
2015/04/13 17:44:29
Done.
|
try: |
ps_data = line.split() |
if process_name in ps_data[-1]: |
@@ -1430,7 +1429,8 @@ class DeviceUtils(object): |
'Private_Dirty') |
showmap_out = self.RunShellCommand( |
- ['showmap', str(pid)], as_root=True, check_return=True) |
+ ['showmap', str(pid)], as_root=True, check_return=True, |
+ large_output=True) |
perezju
2015/04/13 09:58:32
How about: 'showmap {{pid}} | grep TOTAL'
jbudorick
2015/04/13 17:44:29
Done.
|
if not showmap_out: |
raise device_errors.CommandFailedError('No output from showmap') |