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

Commit 01f050f2 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by android-build-merger
Browse files

Merge "Update frameworks/base to new compiler filters." am: 431bc340

am: fee9c65f

Change-Id: I19bfb0fff74e9660029f8a6eee4dd010d2f6c702
parents d29ce6ae fee9c65f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -529,7 +529,7 @@ bool AndroidRuntime::parseRuntimeOption(const char* property,
/*
 * Reads a "property" into "buffer". If the property is non-empty, it
 * is treated as a dex2oat compiler option that should be
 * passed as a quoted option, e.g. "-Ximage-compiler-option --compiler-filter=verify-none".
 * passed as a quoted option, e.g. "-Ximage-compiler-option --compiler-filter=assume-verified".
 *
 * The "compilerArg" is a prefix for the option such as "--compiler-filter=".
 *
@@ -777,7 +777,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
                               "-Xmx", "-Ximage-compiler-option");
    if (skip_compilation) {
        addOption("-Ximage-compiler-option");
        addOption("--compiler-filter=verify-none");
        addOption("--compiler-filter=assume-verified");
    } else {
        parseCompilerOption("dalvik.vm.image-dex2oat-filter", dex2oatImageCompilerFilterBuf,
                            "--compiler-filter=", "-Ximage-compiler-option");
@@ -808,7 +808,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
                               "-Xmx", "-Xcompiler-option");
    if (skip_compilation) {
        addOption("-Xcompiler-option");
        addOption("--compiler-filter=verify-none");
        addOption("--compiler-filter=assume-verified");

        // We skip compilation when a minimal runtime is brought up for decryption. In that case
        // /data is temporarily backed by a tmpfs, which is usually small.
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ public class OtaDexoptService extends IOtaDexopt.Stub {
            // (by default is speed-profile) they will be interepreted/JITed. This in itself is
            // not a problem as we will end up doing profile guided compilation. However, some
            // core apps may be loaded by system server which doesn't JIT and we need to make
            // sure we don't interpret-only
            // sure we are not interpreting all their code in that process.
            int compilationReason = p.coreApp
                    ? PackageManagerService.REASON_CORE_APP
                    : PackageManagerService.REASON_AB_OTA;
+2 −2
Original line number Diff line number Diff line
@@ -360,10 +360,10 @@ public class PackageDexOptimizer {
        boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
        if (vmSafeMode) {
            // For the compilation, it doesn't really matter what we return here because installd
            // will replace the filter with interpret-only anyway.
            // will replace the filter with 'quicken' anyway.
            // However, we return a non profile guided filter so that we simplify the logic of
            // merging profiles.
            // TODO(calin): safe mode path could be simplified if we pass interpret-only from
            // TODO(calin): safe mode path could be simplified if we pass 'quicken' from
            //              here rather than letting installd decide on the filter.
            return getNonProfileGuidedCompilerFilter(targetCompilerFilter);
        }
+1 −14
Original line number Diff line number Diff line
@@ -7368,20 +7368,7 @@ public class PackageManagerService extends IPackageManager.Stub {
            // are verify-profile but for preopted apps there's no profile.
            // Do a hacky check to ensure that if we have no profiles (a reasonable indication
            // that before the OTA the app was preopted) the app gets compiled with a non-profile
            // filter (by default interpret-only).
            // Note that at this stage unused apps are already filtered.
            if (isSystemApp(pkg) &&
                    DexFile.isProfileGuidedCompilerFilter(compilerFilter) &&
                    !Environment.getReferenceProfile(pkg.packageName).exists()) {
                compilerFilter = getNonProfileGuidedCompilerFilter(compilerFilter);
            }
            // If the OTA updates a system app which was previously preopted to a non-preopted state
            // the app might end up being verified at runtime. That's because by default the apps
            // are verify-profile but for preopted apps there's no profile.
            // Do a hacky check to ensure that if we have no profiles (a reasonable indication
            // that before the OTA the app was preopted) the app gets compiled with a non-profile
            // filter (by default interpret-only).
            // filter (by default 'quicken').
            // Note that at this stage unused apps are already filtered.
            if (isSystemApp(pkg) &&
                    DexFile.isProfileGuidedCompilerFilter(compilerFilter) &&
+4 −4
Original line number Diff line number Diff line
@@ -1454,10 +1454,10 @@ class PackageManagerShellCommand extends ShellCommand {
        pw.println("      -f: force compilation even if not needed");
        pw.println("      -m: select compilation mode");
        pw.println("          MODE is one of the dex2oat compiler filters:");
        pw.println("            verify-none");
        pw.println("            verify-at-runtime");
        pw.println("            verify-profile");
        pw.println("            interpret-only");
        pw.println("            assume-verified");
        pw.println("            extract");
        pw.println("            verify");
        pw.println("            quicken");
        pw.println("            space-profile");
        pw.println("            space");
        pw.println("            speed-profile");