From 8d140fdddf4ac78ba45131589912771a94fada1b Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Thu, 27 Jun 2019 19:37:07 -0700 Subject: [PATCH] Add SystemSuspend HAL to ANR list. Makes SystemSuspend native stack traces available in ANR dumps and adb bugreport. Bug: 135458700 Test: adb shell am hang; check /data/anr/ for android.system.suspend stack traces. Test: adb shell am hang, adb bugreport, grep through bug report for suspend stack traces. (grep -rn "Cmd line: /system/bin/hw/android.system.suspend@1.0-service") Test: Confirmed that deadlock on suspend/resume path triggers ANR dump. Simulated deadlock by adding sleep to suspend thread. Unplug the device lock the screen and wait for suspend to trigger. Check anr dump and bugreport for stack traces. Test: Confirmed traces are also available on user builds via adb bugreport. (adb bugreport pulls data from ANR dump files). Merged-In: I6be189f11193f12351fcf07c6583dce3402de28d Merged-In: Id274afd4e3fbe2288ef6d5f6566c2601b8fc0a50 Merged-In: Icfc67c544e8d3fe3ef59ac12801c1a82c5545935 Change-Id: Ia9cb991894e2e0558144936ecee5e95def405e71 --- .../java/com/android/server/Watchdog.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java index f1ab0be32ce71..a909843324de3 100644 --- a/services/core/java/com/android/server/Watchdog.java +++ b/services/core/java/com/android/server/Watchdog.java @@ -91,16 +91,17 @@ public class Watchdog extends Thread { }; public static final List HAL_INTERFACES_OF_INTEREST = Arrays.asList( - "android.hardware.audio@2.0::IDevicesFactory", - "android.hardware.audio@4.0::IDevicesFactory", - "android.hardware.bluetooth@1.0::IBluetoothHci", - "android.hardware.camera.provider@2.4::ICameraProvider", - "android.hardware.graphics.composer@2.1::IComposer", - "android.hardware.health@2.0::IHealth", - "android.hardware.media.omx@1.0::IOmx", - "android.hardware.media.omx@1.0::IOmxStore", - "android.hardware.sensors@1.0::ISensors", - "android.hardware.vr@1.0::IVr" + "android.hardware.audio@2.0::IDevicesFactory", + "android.hardware.audio@4.0::IDevicesFactory", + "android.hardware.bluetooth@1.0::IBluetoothHci", + "android.hardware.camera.provider@2.4::ICameraProvider", + "android.hardware.graphics.composer@2.1::IComposer", + "android.hardware.health@2.0::IHealth", + "android.hardware.media.omx@1.0::IOmx", + "android.hardware.media.omx@1.0::IOmxStore", + "android.hardware.sensors@1.0::ISensors", + "android.hardware.vr@1.0::IVr", + "android.system.suspend@1.0::ISystemSuspend" ); static Watchdog sWatchdog;