Added BinderCallsStatsService
It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.
Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)
Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 70abf80..0aefd62 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -703,6 +703,11 @@
mWebViewUpdateService = mSystemServiceManager.startService(WebViewUpdateService.class);
traceEnd();
}
+
+ // Tracks cpu time spent in binder calls
+ traceBeginAndSlog("StartBinderCallsStatsService");
+ BinderCallsStatsService.start();
+ traceEnd();
}
/**