Add more tracing to service lifecycle

Add tracing for each individual service in the boot phase events.

Bug 30758864

Tested by looking at a systrace

Change-Id: Iaebefb7a5658920e6289e3a0398c42705372d572
This commit is contained in:
Philip Cuadra
2016-08-17 18:02:24 -07:00
parent 7d3d7ae556
commit 4345c0d3f5

View File

@@ -138,6 +138,7 @@ public class SystemServiceManager {
final int serviceLen = mServices.size();
for (int i = 0; i < serviceLen; i++) {
final SystemService service = mServices.get(i);
Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, service.getClass().getName());
try {
service.onBootPhase(mCurrentPhase);
} catch (Exception ex) {
@@ -146,6 +147,7 @@ public class SystemServiceManager {
+ ": onBootPhase threw an exception during phase "
+ mCurrentPhase, ex);
}
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
}
} finally {
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);