Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36527a3d authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Make profile inline cache threshold configurable.

After this change, the profile inline cache threshold is configurable
through a system property "dalvik.vm.ps-inline-cache-threshold".

Bug: 309434431
Test: Set "dalvik.vm.ps-inline-cache-threshold" to different values, run
  a compose app benchmark, dump the profile, and see the difference in
  the profiles.
Change-Id: Ie430d8d21e2d4af92385b244bf327900b9c14d93
parent 778002bd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -652,6 +652,8 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
            sizeof("-Xps-save-resolved-classes-delay-ms:")-1 + PROPERTY_VALUE_MAX];
    char profileMinSavePeriodOptsBuf[sizeof("-Xps-min-save-period-ms:")-1 + PROPERTY_VALUE_MAX];
    char profileMinFirstSaveOptsBuf[sizeof("-Xps-min-first-save-ms:") - 1 + PROPERTY_VALUE_MAX];
    char profileInlineCacheThresholdOptsBuf[
            sizeof("-Xps-inline-cache-threshold:") - 1 + PROPERTY_VALUE_MAX];
    char madviseWillNeedFileSizeVdex[
            sizeof("-XMadviseWillNeedVdexFileSize:")-1 + PROPERTY_VALUE_MAX];
    char madviseWillNeedFileSizeOdex[
@@ -897,6 +899,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
    parseRuntimeOption("dalvik.vm.ps-min-first-save-ms", profileMinFirstSaveOptsBuf,
            "-Xps-min-first-save-ms:");

    parseRuntimeOption("dalvik.vm.ps-inline-cache-threshold", profileInlineCacheThresholdOptsBuf,
            "-Xps-inline-cache-threshold:");

    property_get("ro.config.low_ram", propBuf, "");
    if (strcmp(propBuf, "true") == 0) {
      addOption("-XX:LowMemoryMode");