Loading core/jni/AndroidRuntime.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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=". * Loading Loading @@ -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"); Loading Loading @@ -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. Loading services/core/java/com/android/server/pm/OtaDexoptService.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading services/core/java/com/android/server/pm/PackageDexOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading services/core/java/com/android/server/pm/PackageManagerService.java +1 −14 Original line number Diff line number Diff line Loading @@ -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) && Loading services/core/java/com/android/server/pm/PackageManagerShellCommand.java +4 −4 Original line number Diff line number Diff line Loading @@ -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"); Loading Loading
core/jni/AndroidRuntime.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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=". * Loading Loading @@ -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"); Loading Loading @@ -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. Loading
services/core/java/com/android/server/pm/OtaDexoptService.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
services/core/java/com/android/server/pm/PackageDexOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading
services/core/java/com/android/server/pm/PackageManagerService.java +1 −14 Original line number Diff line number Diff line Loading @@ -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) && Loading
services/core/java/com/android/server/pm/PackageManagerShellCommand.java +4 −4 Original line number Diff line number Diff line Loading @@ -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"); Loading