diff options
| author | 2019-12-09 20:21:43 +0000 | |
|---|---|---|
| committer | 2019-12-09 20:21:43 +0000 | |
| commit | 34bc0deb01e30f6be0ceda080db46b4080896167 (patch) | |
| tree | 462582fa3661664a7f7c6ecbbf379de75b4d3e04 | |
| parent | 67eae9d7baff16bc37dc56833e0d11f358bae768 (diff) | |
| parent | febe967be4a1e19129dc5e27abcd35a26ba32ecb (diff) | |
Merge "Start zygote with -Xopaque-jni-ids:swapable"
| -rw-r--r-- | core/jni/AndroidRuntime.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 23837316ba8e..8e0e1c6be688 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -693,6 +693,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p char methodTraceFileSizeBuf[sizeof("-Xmethod-trace-file-size:") + PROPERTY_VALUE_MAX]; std::string fingerprintBuf; char jdwpProviderBuf[sizeof("-XjdwpProvider:") - 1 + PROPERTY_VALUE_MAX]; + char opaqueJniIds[sizeof("-Xopaque-jni-ids:") - 1 + PROPERTY_VALUE_MAX]; char bootImageBuf[sizeof("-Ximage:") - 1 + PROPERTY_VALUE_MAX]; // Read if we are using the profile configuration, do this at the start since the last ART args @@ -884,6 +885,14 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p "default"); } + // Only pass an explicit opaque-jni-ids to apps forked from zygote + if (zygote) { + parseRuntimeOption("dalvik.vm.opaque-jni-ids", + opaqueJniIds, + "-Xopaque-jni-ids:", + "swapable"); + } + parseRuntimeOption("dalvik.vm.lockprof.threshold", lockProfThresholdBuf, "-Xlockprofthreshold:"); |