diff options
| author | 2014-05-14 23:52:02 +0000 | |
|---|---|---|
| committer | 2014-05-14 23:52:02 +0000 | |
| commit | c0f18b9d0cce0c140b1274055faabff732f1e27c (patch) | |
| tree | 97febf7ca98a1e6c24ba2361e263d69b3a925f5c | |
| parent | d05c7d265170ca6573bbdd97f3c4aaa8e25a6389 (diff) | |
| parent | c4c77d63d889baca2abbdce6326077f0911b279e (diff) | |
am c4c77d63: Merge "Add property for background GC type"
* commit 'c4c77d63d889baca2abbdce6326077f0911b279e':
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 362a54ec1a47..fc6cc81cc8ee 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. |