summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2020-01-30 18:52:19 -0800
committer Calin Juravle <calin@google.com> 2020-01-30 18:52:19 -0800
commit1038dcdf2ce2340d8ebdf12e17456f7ef3eba7a6 (patch)
tree53850f5545c425939c5db947883d0879e5e74293
parent64c1e4ddef0b4fa3a9be8889ec6c9d2fd24107f7 (diff)
Pass down more profile saver options to the runtime
Add the delay to save the resolved classes as a system property and pass it down to the runtime Test: build and check profile saver activity Bug: 141487932 Change-Id: I17278505e29295d3ecfe1e1e782da11f5356ebfd
-rw-r--r--core/jni/AndroidRuntime.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 551541e4329a..cbba5bbee01c 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -664,6 +664,8 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
char jitprithreadweightOptBuf[sizeof("-Xjitprithreadweight:")-1 + PROPERTY_VALUE_MAX];
char jittransitionweightOptBuf[sizeof("-Xjittransitionweight:")-1 + PROPERTY_VALUE_MAX];
char hotstartupsamplesOptsBuf[sizeof("-Xps-hot-startup-method-samples:")-1 + PROPERTY_VALUE_MAX];
+ char saveResolvedClassesDelayMsOptsBuf[
+ sizeof("-Xps-save-resolved-classes-delay-ms:")-1 + PROPERTY_VALUE_MAX];
char madviseRandomOptsBuf[sizeof("-XX:MadviseRandomAccess:")-1 + PROPERTY_VALUE_MAX];
char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
@@ -859,6 +861,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
parseRuntimeOption("dalvik.vm.hot-startup-method-samples", hotstartupsamplesOptsBuf,
"-Xps-hot-startup-method-samples:");
+ parseRuntimeOption("dalvik.vm.ps-resolved-classes-delay-ms", saveResolvedClassesDelayMsOptsBuf,
+ "-Xps-save-resolved-classes-delay-ms:");
+
property_get("ro.config.low_ram", propBuf, "");
if (strcmp(propBuf, "true") == 0) {
addOption("-XX:LowMemoryMode");