From 3bb32503d47be30e5083acd1fe1bd6e74fd64697 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 23 Jan 2018 17:57:24 +0000 Subject: [PATCH] Add dalvik.vm.minidebuginfo property for ART The property enables generation of mini-debug-info for JIT. Change-Id: I1cfce8b1b463d9e45bbe823c285c1639653bb1b5 --- core/jni/AndroidRuntime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 35ab56a1a4565..d7f725d03edfc 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -969,6 +969,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) addOption("--generate-debug-info"); } + // The mini-debug-info makes it possible to backtrace through JIT code. + if (property_get_bool("dalvik.vm.minidebuginfo", 0)) { + addOption("-Xcompiler-option"); + addOption("--generate-mini-debug-info"); + } + /* * Retrieve the build fingerprint and provide it to the runtime. That way, ANR dumps will * contain the fingerprint and can be parsed.