Loading services/core/java/com/android/server/Watchdog.java +1 −0 Original line number Diff line number Diff line Loading @@ -685,6 +685,7 @@ public class Watchdog { final UUID errorId = mTraceErrorLogger.generateErrorId(); if (mTraceErrorLogger.isAddErrorIdEnabled()) { mTraceErrorLogger.addErrorIdToTrace("system_server", errorId); mTraceErrorLogger.addSubjectToTrace(subject, errorId); } // Log the atom as early as possible since it is used as a mechanism to trigger Loading services/core/java/com/android/server/am/ProcessErrorStateRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,7 @@ class ProcessErrorStateRecord { && mService.mTraceErrorLogger.isAddErrorIdEnabled()) { errorId = mService.mTraceErrorLogger.generateErrorId(); mService.mTraceErrorLogger.addErrorIdToTrace(mApp.processName, errorId); mService.mTraceErrorLogger.addSubjectToTrace(annotation, errorId); } else { errorId = null; } Loading services/core/java/com/android/server/am/TraceErrorLogger.java +13 −0 Original line number Diff line number Diff line Loading @@ -54,4 +54,17 @@ public class TraceErrorLogger { COUNTER_PREFIX + processName + "#" + errorId.toString(), PLACEHOLDER_VALUE); } /** * Pushes a counter containing an ANR/Watchdog subject and a unique id so that the subject * can be uniquely identified. * * @param subject The subject to include in the trace. * @param errorId The unique id with which to tag the trace. */ public void addSubjectToTrace(String subject, UUID errorId) { Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER, String.format("Subject(for ErrorId %s):%s", errorId.toString(), subject), PLACEHOLDER_VALUE); } } Loading
services/core/java/com/android/server/Watchdog.java +1 −0 Original line number Diff line number Diff line Loading @@ -685,6 +685,7 @@ public class Watchdog { final UUID errorId = mTraceErrorLogger.generateErrorId(); if (mTraceErrorLogger.isAddErrorIdEnabled()) { mTraceErrorLogger.addErrorIdToTrace("system_server", errorId); mTraceErrorLogger.addSubjectToTrace(subject, errorId); } // Log the atom as early as possible since it is used as a mechanism to trigger Loading
services/core/java/com/android/server/am/ProcessErrorStateRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,7 @@ class ProcessErrorStateRecord { && mService.mTraceErrorLogger.isAddErrorIdEnabled()) { errorId = mService.mTraceErrorLogger.generateErrorId(); mService.mTraceErrorLogger.addErrorIdToTrace(mApp.processName, errorId); mService.mTraceErrorLogger.addSubjectToTrace(annotation, errorId); } else { errorId = null; } Loading
services/core/java/com/android/server/am/TraceErrorLogger.java +13 −0 Original line number Diff line number Diff line Loading @@ -54,4 +54,17 @@ public class TraceErrorLogger { COUNTER_PREFIX + processName + "#" + errorId.toString(), PLACEHOLDER_VALUE); } /** * Pushes a counter containing an ANR/Watchdog subject and a unique id so that the subject * can be uniquely identified. * * @param subject The subject to include in the trace. * @param errorId The unique id with which to tag the trace. */ public void addSubjectToTrace(String subject, UUID errorId) { Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER, String.format("Subject(for ErrorId %s):%s", errorId.toString(), subject), PLACEHOLDER_VALUE); } }