Add process name to error id.
Bug: b/188122403 Test: Manual. Change-Id: I35eaaeef304cfb756f17d46cb2c98f6a729ed34d
This commit is contained in:
@@ -676,7 +676,7 @@ public class Watchdog {
|
||||
final UUID errorId;
|
||||
if (mTraceErrorLogger.isAddErrorIdEnabled()) {
|
||||
errorId = mTraceErrorLogger.generateErrorId();
|
||||
mTraceErrorLogger.addErrorIdToTrace(errorId);
|
||||
mTraceErrorLogger.addErrorIdToTrace("system_server", errorId);
|
||||
} else {
|
||||
errorId = null;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ class ProcessErrorStateRecord {
|
||||
|
||||
if (mService.mTraceErrorLogger.isAddErrorIdEnabled()) {
|
||||
errorId = mService.mTraceErrorLogger.generateErrorId();
|
||||
mService.mTraceErrorLogger.addErrorIdToTrace(errorId);
|
||||
mService.mTraceErrorLogger.addErrorIdToTrace(mApp.processName, errorId);
|
||||
} else {
|
||||
errorId = null;
|
||||
}
|
||||
|
||||
@@ -46,10 +46,12 @@ public class TraceErrorLogger {
|
||||
* can be uniquely identified. We also add the same id to the dropbox entry of the error, so
|
||||
* that we can join the trace and the error server-side.
|
||||
*
|
||||
* @param errorId The unique id with which to tag the trace.
|
||||
* @param processName The process name to include in the error id.
|
||||
* @param errorId The unique id with which to tag the trace.
|
||||
*/
|
||||
public void addErrorIdToTrace(UUID errorId) {
|
||||
Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER, COUNTER_PREFIX + errorId.toString(),
|
||||
public void addErrorIdToTrace(String processName, UUID errorId) {
|
||||
Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER,
|
||||
COUNTER_PREFIX + processName + "#" + errorId.toString(),
|
||||
PLACEHOLDER_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user