OSDN Git Service

Dump full stacks during ANR & UIWDT
authorEmmanuel Berthier <emmanuel.berthier@intel.com>
Tue, 7 Apr 2015 16:38:02 +0000 (18:38 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Jul 2016 09:53:15 +0000 (17:53 +0800)
And add some useful daemons stacks.

Change-Id: Ifd1fb6b57dea78997f93c6a3a7ecee0766ee85c4
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-10293
Reviewed-on: https://android.intel.com:443/383101
Reviewed-on: https://android.intel.com/385134
Reviewed-by: Sjolander, Simon <simon.sjolander@intel.com>
Tested-by: Sjolander, Simon <simon.sjolander@intel.com>
Reviewed-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
Tested-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
services/core/java/com/android/server/Watchdog.java
services/core/java/com/android/server/am/ActivityManagerService.java

index 772a15c..b7347b8 100644 (file)
@@ -66,7 +66,12 @@ public class Watchdog extends Thread {
     public static final String[] NATIVE_STACKS_OF_INTEREST = new String[] {
         "/system/bin/mediaserver",
         "/system/bin/sdcard",
-        "/system/bin/surfaceflinger"
+        "/system/bin/surfaceflinger",
+        "/system/bin/sensorhubd",
+        "/system/bin/servicemanager",
+        "/system/bin/drmserver",
+        "/system/bin/gpsd",
+        "/sbin/healthd"
     };
 
     static Watchdog sWatchdog;
index 33d0a9f..201a57c 100644 (file)
@@ -391,7 +391,9 @@ public final class ActivityManagerService extends ActivityManagerNative
     static final String[] EMPTY_STRING_ARRAY = new String[0];
 
     // How many bytes to write into the dropbox log before truncating
-    static final int DROPBOX_MAX_SIZE = 256 * 1024;
+    // Give userdebug builds a larger max to capture extra debug, esp. for stack dump.
+    static final int DROPBOX_MAX_SIZE =
+        SystemProperties.getInt("ro.debuggable", 0) == 1 ? 4096 * 1024 : 256 * 1024;
 
     // Access modes for handleIncomingUser.
     static final int ALLOW_NON_FULL = 0;