Loading core/java/android/app/LoadedApk.java +8 −4 Original line number Diff line number Diff line Loading @@ -356,15 +356,19 @@ public final class LoadedApk { if (instrumentationSplitAppDirs != null) { Collections.addAll(outZipPaths, instrumentationSplitAppDirs); } if (!instrumentationAppDir.equals(instrumentedAppDir)) { outZipPaths.add(instrumentedAppDir); if (instrumentedSplitAppDirs != null) { Collections.addAll(outZipPaths, instrumentedSplitAppDirs); } } if (outLibPaths != null) { outLibPaths.add(instrumentationLibDir); if (!instrumentationLibDir.equals(instrumentedLibDir)) { outLibPaths.add(instrumentedLibDir); } } if (!instrumentedAppDir.equals(instrumentationAppDir)) { instrumentationLibs = getLibrariesFor(instrumentationPackageName); Loading core/java/com/android/internal/os/InstallerConnection.java +7 −5 Original line number Diff line number Diff line Loading @@ -135,14 +135,15 @@ public class InstallerConnection { } public void dexopt(String apkPath, int uid, String instructionSet, int dexoptNeeded, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { dexopt(apkPath, uid, "*", instructionSet, dexoptNeeded, null /*outputPath*/, dexFlags, compilerFilter, volumeUuid); int dexFlags, String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { dexopt(apkPath, uid, "*", instructionSet, dexoptNeeded, null /*outputPath*/, dexFlags, compilerFilter, volumeUuid, sharedLibraries); } public void dexopt(String apkPath, int uid, String pkgName, String instructionSet, int dexoptNeeded, String outputPath, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { String volumeUuid, String sharedLibraries) throws InstallerException { execute("dexopt", apkPath, uid, Loading @@ -152,7 +153,8 @@ public class InstallerConnection { outputPath, dexFlags, compilerFilter, volumeUuid); volumeUuid, sharedLibraries); } public boolean mergeProfiles(int uid, String pkgName) throws InstallerException { Loading core/java/com/android/internal/os/ZygoteInit.java +7 −2 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ public class ZygoteInit { final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); try { String sharedLibraries = ""; for (String classPathElement : classPathElements) { // System server is fully AOTed and never profiled // for profile guided compilation. Loading @@ -508,9 +509,13 @@ public class ZygoteInit { false /* newProfile */); if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) { installer.dexopt(classPathElement, Process.SYSTEM_UID, instructionSet, dexoptNeeded, 0 /*dexFlags*/, "speed", null /*volumeUuid*/); dexoptNeeded, 0 /*dexFlags*/, "speed", null /*volumeUuid*/, sharedLibraries); } if (!sharedLibraries.isEmpty()) { sharedLibraries += ":"; } sharedLibraries += classPathElement; } } catch (IOException | InstallerException e) { throw new RuntimeException("Error starting system_server", e); Loading services/core/java/com/android/server/pm/Installer.java +6 −5 Original line number Diff line number Diff line Loading @@ -133,19 +133,20 @@ public final class Installer extends SystemService { } public void dexopt(String apkPath, int uid, String instructionSet, int dexoptNeeded, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { int dexFlags, String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { assertValidInstructionSet(instructionSet); mInstaller.dexopt(apkPath, uid, instructionSet, dexoptNeeded, dexFlags, compilerFilter, volumeUuid); compilerFilter, volumeUuid, sharedLibraries); } public void dexopt(String apkPath, int uid, String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, String volumeUuid) String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { assertValidInstructionSet(instructionSet); mInstaller.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter, volumeUuid); outputPath, dexFlags, compilerFilter, volumeUuid, sharedLibraries); } public boolean mergeProfiles(int uid, String pkgName) throws InstallerException { Loading services/core/java/com/android/server/pm/OtaDexoptService.java +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets; import static com.android.server.pm.PackageManagerServiceCompilerMapping.getCompilerFilterForReason; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.IOtaDexopt; import android.content.pm.PackageManager; import android.content.pm.PackageParser; import android.os.Environment; import android.os.RemoteException; Loading Loading @@ -142,7 +144,8 @@ public class OtaDexoptService extends IOtaDexopt.Stub { return; } mPackageDexOptimizer.performDexOpt(nextPackage, null /* ISAs */, false /* useProfiles */, mPackageDexOptimizer.performDexOpt(nextPackage, nextPackage.usesLibraryFiles, null /* ISAs */, false /* checkProfiles */, getCompilerFilterForReason(PackageManagerService.REASON_AB_OTA)); } Loading Loading
core/java/android/app/LoadedApk.java +8 −4 Original line number Diff line number Diff line Loading @@ -356,15 +356,19 @@ public final class LoadedApk { if (instrumentationSplitAppDirs != null) { Collections.addAll(outZipPaths, instrumentationSplitAppDirs); } if (!instrumentationAppDir.equals(instrumentedAppDir)) { outZipPaths.add(instrumentedAppDir); if (instrumentedSplitAppDirs != null) { Collections.addAll(outZipPaths, instrumentedSplitAppDirs); } } if (outLibPaths != null) { outLibPaths.add(instrumentationLibDir); if (!instrumentationLibDir.equals(instrumentedLibDir)) { outLibPaths.add(instrumentedLibDir); } } if (!instrumentedAppDir.equals(instrumentationAppDir)) { instrumentationLibs = getLibrariesFor(instrumentationPackageName); Loading
core/java/com/android/internal/os/InstallerConnection.java +7 −5 Original line number Diff line number Diff line Loading @@ -135,14 +135,15 @@ public class InstallerConnection { } public void dexopt(String apkPath, int uid, String instructionSet, int dexoptNeeded, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { dexopt(apkPath, uid, "*", instructionSet, dexoptNeeded, null /*outputPath*/, dexFlags, compilerFilter, volumeUuid); int dexFlags, String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { dexopt(apkPath, uid, "*", instructionSet, dexoptNeeded, null /*outputPath*/, dexFlags, compilerFilter, volumeUuid, sharedLibraries); } public void dexopt(String apkPath, int uid, String pkgName, String instructionSet, int dexoptNeeded, String outputPath, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { String volumeUuid, String sharedLibraries) throws InstallerException { execute("dexopt", apkPath, uid, Loading @@ -152,7 +153,8 @@ public class InstallerConnection { outputPath, dexFlags, compilerFilter, volumeUuid); volumeUuid, sharedLibraries); } public boolean mergeProfiles(int uid, String pkgName) throws InstallerException { Loading
core/java/com/android/internal/os/ZygoteInit.java +7 −2 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ public class ZygoteInit { final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); try { String sharedLibraries = ""; for (String classPathElement : classPathElements) { // System server is fully AOTed and never profiled // for profile guided compilation. Loading @@ -508,9 +509,13 @@ public class ZygoteInit { false /* newProfile */); if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) { installer.dexopt(classPathElement, Process.SYSTEM_UID, instructionSet, dexoptNeeded, 0 /*dexFlags*/, "speed", null /*volumeUuid*/); dexoptNeeded, 0 /*dexFlags*/, "speed", null /*volumeUuid*/, sharedLibraries); } if (!sharedLibraries.isEmpty()) { sharedLibraries += ":"; } sharedLibraries += classPathElement; } } catch (IOException | InstallerException e) { throw new RuntimeException("Error starting system_server", e); Loading
services/core/java/com/android/server/pm/Installer.java +6 −5 Original line number Diff line number Diff line Loading @@ -133,19 +133,20 @@ public final class Installer extends SystemService { } public void dexopt(String apkPath, int uid, String instructionSet, int dexoptNeeded, int dexFlags, String compilerFilter, String volumeUuid) throws InstallerException { int dexFlags, String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { assertValidInstructionSet(instructionSet); mInstaller.dexopt(apkPath, uid, instructionSet, dexoptNeeded, dexFlags, compilerFilter, volumeUuid); compilerFilter, volumeUuid, sharedLibraries); } public void dexopt(String apkPath, int uid, String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, String volumeUuid) String compilerFilter, String volumeUuid, String sharedLibraries) throws InstallerException { assertValidInstructionSet(instructionSet); mInstaller.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter, volumeUuid); outputPath, dexFlags, compilerFilter, volumeUuid, sharedLibraries); } public boolean mergeProfiles(int uid, String pkgName) throws InstallerException { Loading
services/core/java/com/android/server/pm/OtaDexoptService.java +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets; import static com.android.server.pm.PackageManagerServiceCompilerMapping.getCompilerFilterForReason; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.IOtaDexopt; import android.content.pm.PackageManager; import android.content.pm.PackageParser; import android.os.Environment; import android.os.RemoteException; Loading Loading @@ -142,7 +144,8 @@ public class OtaDexoptService extends IOtaDexopt.Stub { return; } mPackageDexOptimizer.performDexOpt(nextPackage, null /* ISAs */, false /* useProfiles */, mPackageDexOptimizer.performDexOpt(nextPackage, nextPackage.usesLibraryFiles, null /* ISAs */, false /* checkProfiles */, getCompilerFilterForReason(PackageManagerService.REASON_AB_OTA)); } Loading