Add prefix to logs based on call source
Bug: 144166111 Test: manual, ./external/chromium-trace/systrace.py camera -o /tmp/mytrace.html (after changing tracing tag to "camera" since it isn't used for anything else in automotive) Change-Id: I082888daee17c671ba9ab5c8cf1ae486e683ab16
This commit is contained in:
@@ -142,7 +142,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv
|
||||
|
||||
public void startServicesIfNeeded() {
|
||||
String[] names = getResources().getStringArray(R.array.config_systemUIServiceComponents);
|
||||
startServicesIfNeeded(names);
|
||||
startServicesIfNeeded(/* metricsPrefix= */ "StartServices", names);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,10 +154,10 @@ public class SystemUIApplication extends Application implements SysUiServiceProv
|
||||
void startSecondaryUserServicesIfNeeded() {
|
||||
String[] names =
|
||||
getResources().getStringArray(R.array.config_systemUIServiceComponentsPerUser);
|
||||
startServicesIfNeeded(names);
|
||||
startServicesIfNeeded(/* metricsPrefix= */ "StartSecondaryServices", names);
|
||||
}
|
||||
|
||||
private void startServicesIfNeeded(String[] services) {
|
||||
private void startServicesIfNeeded(String metricsPrefix, String[] services) {
|
||||
if (mServicesStarted) {
|
||||
return;
|
||||
}
|
||||
@@ -178,12 +178,12 @@ public class SystemUIApplication extends Application implements SysUiServiceProv
|
||||
Process.myUserHandle().getIdentifier() + ".");
|
||||
TimingsTraceLog log = new TimingsTraceLog("SystemUIBootTiming",
|
||||
Trace.TRACE_TAG_APP);
|
||||
log.traceBegin("StartServices");
|
||||
log.traceBegin(metricsPrefix);
|
||||
final int N = services.length;
|
||||
for (int i = 0; i < N; i++) {
|
||||
String clsName = services[i];
|
||||
if (DEBUG) Log.d(TAG, "loading: " + clsName);
|
||||
log.traceBegin("StartServices" + clsName);
|
||||
log.traceBegin(metricsPrefix + clsName);
|
||||
long ti = System.currentTimeMillis();
|
||||
Class cls;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user