am e59b7ce2: Merge "Add JIT system properties"
* commit 'e59b7ce2564a916240e561b36f4476f2d72a65c5': Add JIT system properties
This commit is contained in:
@@ -546,6 +546,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
|
|||||||
char heapgrowthlimitOptsBuf[sizeof("-XX:HeapGrowthLimit=")-1 + PROPERTY_VALUE_MAX];
|
char heapgrowthlimitOptsBuf[sizeof("-XX:HeapGrowthLimit=")-1 + PROPERTY_VALUE_MAX];
|
||||||
char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
|
char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
|
||||||
char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
|
char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char usejitOptsBuf[sizeof("-Xusejit:")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char jitthresholdOptsBuf[sizeof("-Xjitthreshold:")-1 + PROPERTY_VALUE_MAX];
|
||||||
char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
|
char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
|
||||||
char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
|
char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
|
||||||
char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX];
|
char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX];
|
||||||
@@ -642,6 +645,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
|
|||||||
heaptargetutilizationOptsBuf,
|
heaptargetutilizationOptsBuf,
|
||||||
"-XX:HeapTargetUtilization=");
|
"-XX:HeapTargetUtilization=");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JIT related options.
|
||||||
|
*/
|
||||||
|
parseRuntimeOption("dalvik.vm.usejit", usejitOptsBuf, "-Xusejit:");
|
||||||
|
parseRuntimeOption("dalvik.vm.jitcodecachesize", jitcodecachesizeOptsBuf, "-Xjitcodecachesize:");
|
||||||
|
parseRuntimeOption("dalvik.vm.jitthreshold", jitthresholdOptsBuf, "-Xjitthreshold:");
|
||||||
|
|
||||||
property_get("ro.config.low_ram", propBuf, "");
|
property_get("ro.config.low_ram", propBuf, "");
|
||||||
if (strcmp(propBuf, "true") == 0) {
|
if (strcmp(propBuf, "true") == 0) {
|
||||||
addOption("-XX:LowMemoryMode");
|
addOption("-XX:LowMemoryMode");
|
||||||
|
|||||||
Reference in New Issue
Block a user