dumpstate: report process times
(cherry picked from commit 0751efa64cddfab69749236193e776058c9db595)
- Fix per-pid helper to pick up comm if cmdline is empty
and assume kernel thread.
- Add per pid report command line user time if not kernel thread,
system time and I/O time, plus percentage if non zero.
Bug: 26966375
Change-Id: I6b499f535cc3687eb468b32ae39e7d151dffb11f
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 98617f4..0412209 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -613,6 +613,7 @@
run_command("LIST OF OPEN FILES", 10, SU_PATH, "root", "lsof", NULL);
for_each_pid(do_showmap, "SMAPS OF ALL PROCESSES");
for_each_tid(show_wchan, "BLOCKED PROCESS WAIT-CHANNELS");
+ for_each_pid(show_showtime, "PROCESS TIMES (pid cmd user system iowait+percentage)");
if (!screenshot_path.empty()) {
MYLOGI("taking late screenshot\n");