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

Unified Diff: tools/telemetry/telemetry/core/platform/cros_platform_backend.py

Issue 23745007: Fix browser.memory_stats has no GPU and Renderer info on CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698