diff options
| author | 2022-12-09 15:15:38 -0800 | |
|---|---|---|
| committer | 2022-12-09 15:28:00 -0800 | |
| commit | b65b495e97f95dc1e576bc3c1bb4e47053200690 (patch) | |
| tree | d6ffb36e94b5ae7551949cc0323521fa25110668 | |
| parent | bdf3e2eae2fe6ed4757259661ecb0e7171056b56 (diff) | |
Add uptime to `am monitor` output
Bug: N/A
Test: manual test using `am monitor` with a test app that triggers an ANR
Test: atest CtsAppTestCases:ActivityManagerTest#testAppNotResponding
Change-Id: I829eed4500f12d7502d4e030e2a6496017c15496
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerShellCommand.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java index 94c15babb1e5..4a6e5a32a205 100644 --- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java +++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java @@ -1413,6 +1413,7 @@ final class ActivityManagerShellCommand extends ShellCommand { mPw.println("shortMsg: " + shortMsg); mPw.println("longMsg: " + longMsg); mPw.println("timeMillis: " + timeMillis); + mPw.println("uptime: " + SystemClock.uptimeMillis()); mPw.println("stack:"); mPw.print(stackTrace); mPw.println("#"); @@ -1429,6 +1430,7 @@ final class ActivityManagerShellCommand extends ShellCommand { mPw.println("processName: " + processName); mPw.println("processPid: " + pid); mPw.println("annotation: " + annotation); + mPw.println("uptime: " + SystemClock.uptimeMillis()); mPw.flush(); int result = waitControllerLocked(pid, STATE_EARLY_ANR); if (result == RESULT_EARLY_ANR_KILL) return -1; @@ -1442,6 +1444,7 @@ final class ActivityManagerShellCommand extends ShellCommand { mPw.println("** ERROR: PROCESS NOT RESPONDING"); mPw.println("processName: " + processName); mPw.println("processPid: " + pid); + mPw.println("uptime: " + SystemClock.uptimeMillis()); mPw.println("processStats:"); mPw.print(processStats); mPw.println("#"); |