summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2019-04-13 09:59:01 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-13 09:59:01 +0000
commitb94e7e89b279261e5786ff49da4b4bcc0273b0a0 (patch)
tree04fa27cef4bf59db4cbb561b20493283afb8b39b
parent27a8e5b3d41e04926f969adc2c471b2525d99aaf (diff)
parent896d036751eadf168c56bd9483e1ae713c857c72 (diff)
Merge "Pass core platform API policy property to ART" into qt-dev
-rw-r--r--core/jni/AndroidRuntime.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index b6ee0fe782a6..f2665020b49e 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -678,6 +678,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
char lockProfThresholdBuf[sizeof("-Xlockprofthreshold:")-1 + PROPERTY_VALUE_MAX];
char nativeBridgeLibrary[sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX];
char cpuAbiListBuf[sizeof("--cpu-abilist=") + PROPERTY_VALUE_MAX];
+ char corePlatformApiPolicyBuf[sizeof("-Xcore-platform-api-policy:") + PROPERTY_VALUE_MAX];
char methodTraceFileBuf[sizeof("-Xmethod-trace-file:") + PROPERTY_VALUE_MAX];
char methodTraceFileSizeBuf[sizeof("-Xmethod-trace-file-size:") + PROPERTY_VALUE_MAX];
std::string fingerprintBuf;
@@ -1024,6 +1025,16 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
addOption("--generate-mini-debug-info");
}
+ // If set, the property below can be used to enable core platform API violation reporting.
+ property_get("persist.debug.dalvik.vm.core_platform_api_policy", propBuf, "");
+ if (propBuf[0] != '\0') {
+ snprintf(corePlatformApiPolicyBuf,
+ sizeof(corePlatformApiPolicyBuf),
+ "-Xcore-platform-api-policy:%s",
+ propBuf);
+ addOption(corePlatformApiPolicyBuf);
+ }
+
/*
* Retrieve the build fingerprint and provide it to the runtime. That way, ANR dumps will
* contain the fingerprint and can be parsed.