diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-05-15 00:00:48 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-15 00:00:48 +0000 |
commit | ddfe0c77b459ff4f5fe7ad1e2d930814c9a611a5 (patch) | |
tree | 7f8f1b5d22eb52c9763465019c16aeca0e16ca0b | |
parent | f50742b12de14da449de8680791c3ee0f6c4d854 (diff) | |
parent | 760f0994db69b77d06814194beecaca1de330855 (diff) | |
download | frameworks_base-ddfe0c77b459ff4f5fe7ad1e2d930814c9a611a5.zip frameworks_base-ddfe0c77b459ff4f5fe7ad1e2d930814c9a611a5.tar.gz frameworks_base-ddfe0c77b459ff4f5fe7ad1e2d930814c9a611a5.tar.bz2 |
am 760f0994: am c0f18b9d: am c4c77d63: Merge "Add property for background GC type"
* commit '760f0994db69b77d06814194beecaca1de330855':
Add property for background GC type
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 01d8814..1038fa0 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -472,6 +472,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX]; char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX]; char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX]; + char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX]; char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX]; char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX]; char dalvikVmLibBuf[PROPERTY_VALUE_MAX]; @@ -625,6 +626,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) mOptions.add(opt); } + strcpy(backgroundgcOptsBuf, "-XX:BackgroundGC="); + property_get("dalvik.vm.backgroundgctype", backgroundgcOptsBuf+sizeof("-XX:BackgroundGC=")-1, ""); + if (backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1] != '\0') { + opt.optionString = backgroundgcOptsBuf; + mOptions.add(opt); + } + /* * Enable or disable dexopt features, such as bytecode verification and * calculation of register maps for precise GC. |