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

Commit 5e07a0d9 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Add property for system server compiler filter

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

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

Change-Id: I2ef3737f24816a4cb75e718abf274a891eb9fda1
parent 0a47bdbe
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -542,13 +542,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",
                    false /* newProfile */);
                    classPathElement, instructionSet, systemServerFilter, false /* newProfile */);
            } catch (FileNotFoundException ignored) {
                // Do not add to the classpath.
                Log.w(TAG, "Missing classpath element for system server: " + classPathElement);
@@ -566,7 +566,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 {