Include launched packageName in systrace.
This makes it easier to tell which package the activity manager is launching. The downside here is that each launch shows up in a separate row in the systrace, but this matches up with the "Start proc:" label, which contains the package name as well and makes it easier to inspect both simultaneously. bug: 21632700 Change-Id: I20ebc2f2a2cf0dc74c6d7daa4bafa381ae4c4060
This commit is contained in:
@@ -982,7 +982,7 @@ final class ActivityRecord {
|
||||
final long totalTime = stack.mLaunchStartTime != 0
|
||||
? (curTime - stack.mLaunchStartTime) : thisTime;
|
||||
if (SHOW_ACTIVITY_START_TIME) {
|
||||
Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching", 0);
|
||||
Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching: " + packageName, 0);
|
||||
EventLog.writeEvent(EventLogTags.AM_ACTIVITY_LAUNCH_TIME,
|
||||
userId, System.identityHashCode(this), shortComponentName,
|
||||
thisTime, totalTime);
|
||||
|
||||
@@ -679,11 +679,11 @@ final class ActivityStack {
|
||||
"Launch completed; removing icicle of " + r.icicle);
|
||||
}
|
||||
|
||||
private void startLaunchTraces() {
|
||||
private void startLaunchTraces(String packageName) {
|
||||
if (mFullyDrawnStartTime != 0) {
|
||||
Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
|
||||
}
|
||||
Trace.asyncTraceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching", 0);
|
||||
Trace.asyncTraceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching: " + packageName, 0);
|
||||
Trace.asyncTraceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
|
||||
}
|
||||
|
||||
@@ -698,11 +698,11 @@ final class ActivityStack {
|
||||
if (r.displayStartTime == 0) {
|
||||
r.fullyDrawnStartTime = r.displayStartTime = SystemClock.uptimeMillis();
|
||||
if (mLaunchStartTime == 0) {
|
||||
startLaunchTraces();
|
||||
startLaunchTraces(r.packageName);
|
||||
mLaunchStartTime = mFullyDrawnStartTime = r.displayStartTime;
|
||||
}
|
||||
} else if (mLaunchStartTime == 0) {
|
||||
startLaunchTraces();
|
||||
startLaunchTraces(r.packageName);
|
||||
mLaunchStartTime = mFullyDrawnStartTime = SystemClock.uptimeMillis();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user