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

Commit 7e73b516 authored by Mathieu Chartier's avatar Mathieu Chartier Committed by android-build-merger
Browse files

Merge "Add boot profile support"

am: 3d901ec5

Change-Id: I37db2f4bd7e6412954d51e914f6e238db5027a6e
parents 197b62d3 3d901ec5
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
@@ -795,6 +795,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
                            "--compiler-filter=", "-Ximage-compiler-option");
    }

    // If there is a boot profile, it takes precedence over the image and preloaded classes.
    if (hasFile("/system/etc/boot-image.prof")) {
        addOption("-Ximage-compiler-option");
        addOption("--profile-file=/system/etc/boot-image.prof");
        addOption("-Ximage-compiler-option");
        addOption("--compiler-filter=speed-profile");
    } else {
        // Make sure there is a preloaded-classes file.
        if (!hasFile("/system/etc/preloaded-classes")) {
            ALOGE("Missing preloaded-classes file, /system/etc/preloaded-classes not found: %s\n",
@@ -809,6 +816,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
            addOption("-Ximage-compiler-option");
            addOption("--compiled-classes=/system/etc/compiled-classes");
        }
    }

    property_get("dalvik.vm.image-dex2oat-flags", dex2oatImageFlagsBuf, "");
    parseExtraOpts(dex2oatImageFlagsBuf, "-Ximage-compiler-option");