diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-05-14 23:56:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-14 23:56:13 +0000 |
commit | 760f0994db69b77d06814194beecaca1de330855 (patch) | |
tree | 8458b8fedc7e276307ea9add0ad784f7de89afbd | |
parent | 76ee05d4f6a8ddafd2125db69e7560dab7cb2e8a (diff) | |
parent | c0f18b9d0cce0c140b1274055faabff732f1e27c (diff) | |
download | frameworks_base-760f0994db69b77d06814194beecaca1de330855.zip frameworks_base-760f0994db69b77d06814194beecaca1de330855.tar.gz frameworks_base-760f0994db69b77d06814194beecaca1de330855.tar.bz2 |
am c0f18b9d: am c4c77d63: Merge "Add property for background GC type"
* commit 'c0f18b9d0cce0c140b1274055faabff732f1e27c':
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 362a54e..fc6cc81 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -467,6 +467,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]; @@ -620,6 +621,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. |