summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-06-08 17:39:43 +0100
committerNarayan Kamath <narayan@google.com>2015-06-08 17:39:43 +0100
commit7829c81345ce8b7e44ab22bf4433be77e0ebd8ae (patch)
treebe158f351ffae6671fb02ca6373b4ebd8f58e7d9
parent6280481af6a7fb2631012a34b03b2d6b0d01eae5 (diff)
downloadframeworks_base-7829c81345ce8b7e44ab22bf4433be77e0ebd8ae.zip
frameworks_base-7829c81345ce8b7e44ab22bf4433be77e0ebd8ae.tar.gz
frameworks_base-7829c81345ce8b7e44ab22bf4433be77e0ebd8ae.tar.bz2
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
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityRecord.java2
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java8
2 files changed, 5 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 3765a3c..d16eab6 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -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);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 30ee214..eb5af9e 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -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();
}
}