diff options
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerDebugConfig.java | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java index 7ab70fad70d4..ed64475084b8 100644 --- a/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java +++ b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java @@ -42,7 +42,7 @@ class ActivityManagerDebugConfig { static final boolean DEBUG_ALL = false; // Available log categories in the activity manager package. - static final boolean DEBUG_ANR = true; // STOPSHIP disable it (b/113252928) + static final boolean DEBUG_ANR = false; static final boolean DEBUG_BACKGROUND_CHECK = DEBUG_ALL || false; static final boolean DEBUG_BACKUP = DEBUG_ALL || false; static final boolean DEBUG_BROADCAST = DEBUG_ALL || false; diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index b342d37dd37a..f3e09103b633 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -3694,9 +3694,7 @@ public class ActivityManagerService extends IActivityManager.Stub ArrayList<Integer> nativePids) { ArrayList<Integer> extraPids = null; - if (DEBUG_ANR) { - Slog.d(TAG, "dumpStackTraces pids=" + lastPids + " nativepids=" + nativePids); - } + Slog.i(TAG, "dumpStackTraces pids=" + lastPids + " nativepids=" + nativePids); // Measure CPU usage as soon as we're called in order to get a realistic sampling // of the top users at the time of the request. @@ -3718,8 +3716,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + stats.pid); extraPids.add(stats.pid); - } else if (DEBUG_ANR) { - Slog.d(TAG, "Skipping next CPU consuming process, not a java proc: " + } else { + Slog.i(TAG, "Skipping next CPU consuming process, not a java proc: " + stats.pid); } } @@ -3737,9 +3735,6 @@ public class ActivityManagerService extends IActivityManager.Stub if (tracesFile == null) { return null; } - if (DEBUG_ANR) { - Slog.d(TAG, "Dumping to " + tracesFile.getAbsolutePath()); - } dumpStackTraces(tracesFile.getAbsolutePath(), firstPids, nativePids, extraPids); return tracesFile; @@ -3832,6 +3827,8 @@ public class ActivityManagerService extends IActivityManager.Stub public static void dumpStackTraces(String tracesFile, ArrayList<Integer> firstPids, ArrayList<Integer> nativePids, ArrayList<Integer> extraPids) { + Slog.i(TAG, "Dumping to " + tracesFile); + // We don't need any sort of inotify based monitoring when we're dumping traces via // tombstoned. Data is piped to an "intercept" FD installed in tombstoned so we're in full // control of all writes to the file in question. @@ -3843,7 +3840,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (firstPids != null) { int num = firstPids.size(); for (int i = 0; i < num; i++) { - if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for pid " + firstPids.get(i)); + Slog.i(TAG, "Collecting stacks for pid " + firstPids.get(i)); final long timeTaken = dumpJavaTracesTombstoned(firstPids.get(i), tracesFile, remainingTime); @@ -3863,7 +3860,7 @@ public class ActivityManagerService extends IActivityManager.Stub // Next collect the stacks of the native pids if (nativePids != null) { for (int pid : nativePids) { - if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid); + Slog.i(TAG, "Collecting stacks for native pid " + pid); final long nativeDumpTimeoutMs = Math.min(NATIVE_DUMP_TIMEOUT_MS, remainingTime); final long start = SystemClock.elapsedRealtime(); @@ -3887,7 +3884,7 @@ public class ActivityManagerService extends IActivityManager.Stub // Lastly, dump stacks for all extra PIDs from the CPU tracker. if (extraPids != null) { for (int pid : extraPids) { - if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + pid); + Slog.i(TAG, "Collecting stacks for extra pid " + pid); final long timeTaken = dumpJavaTracesTombstoned(pid, tracesFile, remainingTime); @@ -3903,6 +3900,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } } + Slog.i(TAG, "Done dumping"); } @Override |