Index: tools/telemetry/telemetry/core/platform/cros_platform_backend.py |
diff --git a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py |
index 02f6a71b89d67e6c3653ead29085228b978308d5..af2312f6525d4e321f0d104c00d08a91196e9c6b 100644 |
--- a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py |
+++ b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py |
@@ -56,14 +56,13 @@ class CrosPlatformBackend(platform_backend.PlatformBackend): |
def GetChildPids(self, pid): |
"""Returns a list of child pids of |pid|.""" |
all_process_info = self._cri.ListProcesses() |
- processes = [] |
- for pid, _, ppid, state in all_process_info: |
- processes.append((pid, ppid, state)) |
+ processes = [(curr_pid, curr_ppid, curr_state) |
+ for curr_pid, _, curr_ppid, curr_state in all_process_info] |
return proc_util.GetChildPids(processes, pid) |
Owen Lin
2013/09/03 06:42:51
"pid" has been overwrite in the for loop
|
def GetCommandLine(self, pid): |
Owen Lin
2013/09/03 06:42:51
CrosPlatformBackend is no longer a PosixPlatformBa
|
- command = self._GetPsOutput(['command'], pid) |
- return command[0] if command else None |
+ command = self._GetFileContents('/proc/%s/cmdline' % pid) |
+ return command if command else None |
def CanFlushIndividualFilesFromSystemCache(self): |
return True |