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
This commit is contained in:
Fyodor Kupolov
2018-01-10 18:05:53 -08:00
parent 9531b70cae
commit ca34851ead
5 changed files with 415 additions and 0 deletions

View File

@@ -703,6 +703,11 @@ public final class SystemServer {
mWebViewUpdateService = mSystemServiceManager.startService(WebViewUpdateService.class);
traceEnd();
}
// Tracks cpu time spent in binder calls
traceBeginAndSlog("StartBinderCallsStatsService");
BinderCallsStatsService.start();
traceEnd();
}
/**