Merge "As requested, expand ANR event log entry (and crash/WTF too) to include process flags (including FLAG_SYSTEM, etc)."

This commit is contained in:
Dan Egnor
2010-01-22 15:24:17 -08:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 4 deletions

View File

@@ -4610,7 +4610,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
}
// Log the ANR to the event log.
EventLog.writeEvent(EventLogTags.ANR, app.pid, app.processName, annotation);
EventLog.writeEvent(EventLogTags.AM_ANR, app.pid, app.processName, app.info.flags,
annotation);
// Dump thread traces as quickly as we can, starting with "interesting" processes.
ArrayList<Integer> pids = new ArrayList<Integer>(20);
@@ -8750,6 +8751,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
EventLog.writeEvent(EventLogTags.AM_CRASH, Binder.getCallingPid(),
app == null ? "system" : (r == null ? "unknown" : r.processName),
r == null ? -1 : r.info.flags,
crashInfo.exceptionClassName,
crashInfo.exceptionMessage,
crashInfo.throwFileName,
@@ -8773,6 +8775,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
EventLog.writeEvent(EventLogTags.AM_WTF, Binder.getCallingPid(),
app == null ? "system" : (r == null ? "unknown" : r.processName),
r == null ? -1 : r.info.flags,
tag, crashInfo.exceptionMessage);
addErrorToDropBox("wtf", r, null, null, tag, null, null, crashInfo);
@@ -8842,6 +8845,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
sb.append("Process: system_server\n");
} else {
sb.append("Process: ").append(process.processName).append("\n");
sb.append("Flags: 0x").append(Integer.toString(process.info.flags, 16)).append("\n");
}
if (activity != null) {
sb.append("Activity: ").append(activity.shortComponentName).append("\n");

View File

@@ -28,7 +28,7 @@ option java_package com.android.server.am
# An activity has been resumed and is now in the foreground:
30007 am_resume_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
# Application Not Responding
30008 anr (pid|1|5),(Package Name|3),(reason|3)
30008 am_anr (pid|1|5),(Package Name|3),(Flags|1|5),(reason|3)
# Activity launch time
30009 activity_launch_time (Token|1|5),(Component Name|3),(time|2|3)
# Application process bound to work
@@ -80,6 +80,6 @@ option java_package com.android.server.am
30037 am_process_start_timeout (PID|1|5),(UID|1|5),(Process Name|3)
# Unhandled exception
30039 am_crash (PID|1|5),(Process Name|3),(Exception|3),(Message|3),(File|3),(Line|1|5)
30039 am_crash (PID|1|5),(Process Name|3),(Flags|1|5),(Exception|3),(Message|3),(File|3),(Line|1|5)
# Log.wtf() called
30040 am_wtf (PID|1|5),(Process Name|3),(Tag|3),(Message|3)
30040 am_wtf (PID|1|5),(Process Name|3),(Flags|1|5),(Tag|3),(Message|3)