dumpsys: add --thread option
This displays the thread usage of services in the format
"<threadsUsed>/<threadCount>". This has been useful in lshal to find
deadlocks in binder threads.
Test: atest dumpsys_test
Test: run 'dumpsys --thread' on cuttlefish and verify thread usage
Test: run 'dumpsys --thread SurfaceFlinger' and verify thread usage
Bug: 140639610
Change-Id: I0cd3f86ca47ec911b276d8e8859ef54743ee34cf
diff --git a/cmds/dumpsys/Android.bp b/cmds/dumpsys/Android.bp
index 91aa018..6ab6b7f 100644
--- a/cmds/dumpsys/Android.bp
+++ b/cmds/dumpsys/Android.bp
@@ -32,6 +32,7 @@
"libutils",
"liblog",
"libbinder",
+ "libbinderdebug",
],
static_libs: [