From 156ed92c94fb5accceb96ef00390be2894cd3b11 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 30 Jan 2018 14:37:37 +0000 Subject: [PATCH] Propagate the "dalvik.vm.minidebuginfo" property to ART run-time. Change-Id: I27e230fe91490defde4cc38ca8cbc3aa0765fed1 --- core/java/com/android/internal/os/Zygote.java | 2 ++ .../java/com/android/server/am/ActivityManagerService.java | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java index d0f5ba75e8aca..03e5667666c1b 100644 --- a/core/java/com/android/internal/os/Zygote.java +++ b/core/java/com/android/internal/os/Zygote.java @@ -57,6 +57,8 @@ public final class Zygote { public static final int ONLY_USE_SYSTEM_OAT_FILES = 1 << 10; /** Do not enfore hidden API access restrictions. */ public static final int DISABLE_HIDDEN_API_CHECKS = 1 << 11; + /** Force generation of native debugging information for backtraces. */ + public static final int DEBUG_GENERATE_MINI_DEBUG_INFO = 1 << 12; /** No external storage should be mounted. */ public static final int MOUNT_EXTERNAL_NONE = 0; diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index e944326c9f7e6..f0d6757a7feed 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -3863,9 +3863,13 @@ public class ActivityManagerService extends IActivityManager.Stub runtimeFlags |= Zygote.DEBUG_ENABLE_CHECKJNI; } String genDebugInfoProperty = SystemProperties.get("debug.generate-debug-info"); - if ("true".equals(genDebugInfoProperty)) { + if ("1".equals(genDebugInfoProperty) || "true".equals(genDebugInfoProperty)) { runtimeFlags |= Zygote.DEBUG_GENERATE_DEBUG_INFO; } + String genMiniDebugInfoProperty = SystemProperties.get("dalvik.vm.minidebuginfo"); + if ("1".equals(genMiniDebugInfoProperty) || "true".equals(genMiniDebugInfoProperty)) { + runtimeFlags |= Zygote.DEBUG_GENERATE_MINI_DEBUG_INFO; + } if ("1".equals(SystemProperties.get("debug.jni.logging"))) { runtimeFlags |= Zygote.DEBUG_ENABLE_JNI_LOGGING; }