Improve watchdog diagnostics.
Capture stack traces from the system process using the same mechanism as ANRs (which will initialize traces.txt, etc). Also record the watchdog reset in the dropbox for uploading. Bug: 2475557
This commit is contained in:
@@ -4662,7 +4662,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
* @param pids of dalvik VM processes to dump stack traces for
|
||||
* @return file containing stack traces, or null if no dump file is configured
|
||||
*/
|
||||
private static File dumpStackTraces(ArrayList<Integer> pids) {
|
||||
public static File dumpStackTraces(ArrayList<Integer> pids) {
|
||||
String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
|
||||
if (tracesPath == null || tracesPath.length() == 0) {
|
||||
return null;
|
||||
@@ -8958,10 +8958,13 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
* @param logFile to include in the report, null if none
|
||||
* @param crashInfo giving an application stack trace, null if absent
|
||||
*/
|
||||
private void addErrorToDropBox(String eventType,
|
||||
public void addErrorToDropBox(String eventType,
|
||||
ProcessRecord process, HistoryRecord activity, HistoryRecord parent,
|
||||
String subject, String report, File logFile,
|
||||
ApplicationErrorReport.CrashInfo crashInfo) {
|
||||
// NOTE -- this must never acquire the ActivityManagerService lock,
|
||||
// otherwise the watchdog may be prevented from resetting the system.
|
||||
|
||||
String dropboxTag;
|
||||
if (process == null || process.pid == MY_PID) {
|
||||
dropboxTag = "system_server_" + eventType;
|
||||
|
||||
Reference in New Issue
Block a user