Only show the top 10 CPU processes (for CPU usage).

- This is similar to what we do for ANRs.
- Showing the full list just add noise to the watchdog reposts.

Change-Id: Ieca0b180d4f62e44894decf5c17a9a02b9ce103c
This commit is contained in:
Olivier Gaillard
2023-07-10 10:16:42 +00:00
parent 0a25b4138d
commit 9bae3b4385

View File

@@ -915,7 +915,7 @@ public class Watchdog implements Dumpable {
// The system's been hanging for a whlie, another second or two won't hurt much.
SystemClock.sleep(5000);
processCpuTracker.update();
report.append(processCpuTracker.printCurrentState(anrTime));
report.append(processCpuTracker.printCurrentState(anrTime, 10));
report.append(tracesFileException.getBuffer());
if (!halfWatchdog) {