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

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

Merge "Avoid preloading classes for boot image profiling" am: cfee2858 am:...

Merge "Avoid preloading classes for boot image profiling" am: cfee2858 am: 84f358f9 am: ac60bbb7
am: fca111db

Change-Id: Ic28857abef951581a7627e3805ccd3db49c03391
parents c5d074d8 fca111db
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -254,6 +254,18 @@ public class ZygoteInit {

        InputStream is;
        try {
            // If we are profiling the boot image, avoid preloading classes.
            // Can't use device_config since we are the zygote.
            String prop = SystemProperties.get(
                    "persist.device_config.runtime_native_boot.profilebootclasspath", "");
            // Might be empty if the property is unset since the default is "".
            if (prop.length() == 0) {
                prop = SystemProperties.get("dalvik.vm.profilebootclasspath", "");
            }
            if ("true".equals(prop)) {
                return;
            }

            is = new FileInputStream(PRELOADED_CLASSES);
        } catch (FileNotFoundException e) {
            Log.e(TAG, "Couldn't find " + PRELOADED_CLASSES + ".");