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

Commit c477ab14 authored by Mathieu Chartier's avatar Mathieu Chartier Committed by Andreas Gampe
Browse files

Add property for system server compiler filter

The property is dalvik.vm.systemservercompilerfilter, this changes
if dexopt is needed.

(cherry picked from commit 5e07a0d9)

Bug: 62356545
Test: adb shell setprop dalvik.vm.systemservercompilerfilter quicken
Test: adb shell stop && adb shell start

Merged-In: I2ef3737f24816a4cb75e718abf274a891eb9fda1
Change-Id: I2ef3737f24816a4cb75e718abf274a891eb9fda1
parent e523aa4f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -546,12 +546,13 @@ public class ZygoteInit {
        for (String classPathElement : classPathElements) {
            // System server is fully AOTed and never profiled
            // for profile guided compilation.
            // TODO: Make this configurable between INTERPRET_ONLY, SPEED, SPACE and EVERYTHING?
            String systemServerFilter = SystemProperties.get(
                    "dalvik.vm.systemservercompilerfilter", "speed");

            int dexoptNeeded;
            try {
                dexoptNeeded = DexFile.getDexOptNeeded(
                    classPathElement, instructionSet, "speed",
                    classPathElement, instructionSet, systemServerFilter,
                    false /* newProfile */, false /* downgrade */);
            } catch (FileNotFoundException ignored) {
                // Do not add to the classpath.
@@ -570,7 +571,7 @@ public class ZygoteInit {
                final String packageName = "*";
                final String outputPath = null;
                final int dexFlags = 0;
                final String compilerFilter = "speed";
                final String compilerFilter = systemServerFilter;
                final String uuid = StorageManager.UUID_PRIVATE_INTERNAL;
                final String seInfo = null;
                try {