diff options
author | Brian Carlstrom <bdc@google.com> | 2014-03-10 17:57:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-10 17:57:35 +0000 |
commit | 02c7f9582b78c6150da7470ce68bbdcdb7635d56 (patch) | |
tree | b68fb9049029612ae649f956e56afdc7db62e034 | |
parent | 174844118121021a17e37382eeb853774d0a36a6 (diff) | |
parent | 7b7d111ba21c7c5ad161207a75f72948c427b1b0 (diff) | |
download | frameworks_base-02c7f9582b78c6150da7470ce68bbdcdb7635d56.zip frameworks_base-02c7f9582b78c6150da7470ce68bbdcdb7635d56.tar.gz frameworks_base-02c7f9582b78c6150da7470ce68bbdcdb7635d56.tar.bz2 |
am 7b7d111b: am 9e736723: am ec4c7752: am ab97d617: Merge "Only pass -Xprofile-* options to ART"
* commit '7b7d111ba21c7c5ad161207a75f72948c427b1b0':
Only pass -Xprofile-* options to ART
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 06e4717..e50c1d8 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -750,10 +750,11 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) mOptions.add(opt); } - // libart tolerates libdvm flags, but not vice versa, so only pass these if libart. + // libart tolerates libdvm flags, but not vice versa, so only pass some options if libart. property_get("persist.sys.dalvik.vm.lib.1", dalvikVmLibBuf, "libdvm.so"); - if (strncmp(dalvikVmLibBuf, "libart", 6) == 0) { + bool libart = (strncmp(dalvikVmLibBuf, "libart", 6) == 0); + if (libart) { // Extra options for DexClassLoader. property_get("dalvik.vm.dex2oat-flags", dex2oatFlagsBuf, ""); parseExtraOpts(dex2oatFlagsBuf, "-Xcompiler-option"); @@ -784,7 +785,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) /* * Set profiler options */ - { + if (libart) { char period[sizeof("-Xprofile-period:") + PROPERTY_VALUE_MAX]; char duration[sizeof("-Xprofile-duration:") + PROPERTY_VALUE_MAX]; char interval[sizeof("-Xprofile-interval:") + PROPERTY_VALUE_MAX]; |