From 8625b8ee31f734539b5f243daa6885238f573725 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 16 Oct 2015 14:01:22 +1100 Subject: [PATCH] Bug 1214924 - Add "WindowServer" and "kernel" processes to |mach power|'s output. r=BenWa. --- tools/power/mach_commands.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/power/mach_commands.py b/tools/power/mach_commands.py index 52e0adf9aec..281e7a868e9 100644 --- a/tools/power/mach_commands.py +++ b/tools/power/mach_commands.py @@ -105,6 +105,9 @@ class MachCommands(MachCommandBase): # plugin-container # # + # Also, the WindowServer and kernel coalitions and processes are often + # relevant. + # # We want to print all these but omit uninteresting coalitions. We # could do this by properly parsing powermetrics output, but it's # simpler and more robust to just grep for a handful of identifying @@ -129,7 +132,11 @@ class MachCommands(MachCommandBase): # within the terminal, it will show up unnecessarily. This is a # minor disadvantage of this very simple parsing strategy. # - if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal)', line): + # - 'WindowServer' is for the WindowServer. + # + # - 'kernel' is for the kernel. + # + if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal|WindowServer|kernel)', line): print(line) return 0