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/Android.mk b/cmds/dumpstate/Android.mk
index 8515a01..a4b5ff1 100644
--- a/cmds/dumpstate/Android.mk
+++ b/cmds/dumpstate/Android.mk
@@ -18,7 +18,7 @@
 # ZipArchive support, the order matters here to get all symbols.
 LOCAL_STATIC_LIBRARIES := libziparchive libz libbase libmincrypt
 LOCAL_HAL_STATIC_LIBRARIES := libdumpstate
-LOCAL_CFLAGS += -Wall -Wno-unused-parameter -std=gnu99
+LOCAL_CFLAGS += -Wall -Werror -Wno-unused-parameter -std=gnu99
 LOCAL_INIT_RC := dumpstate.rc
 
 include $(BUILD_EXECUTABLE)