Merge "Revert "Enable profile merging for post-OTA package verification"" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-05-10 12:09:25 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 2 deletions

View File

@@ -144,11 +144,18 @@ public class BackgroundDexOptService extends JobService {
if (DEBUG_DEXOPT) { if (DEBUG_DEXOPT) {
Log.i(TAG, "Updating package " + pkg); Log.i(TAG, "Updating package " + pkg);
} }
// Update package if needed. Note that there can be no race between concurrent // Update package if needed. Note that there can be no race between concurrent
// jobs because PackageDexOptimizer.performDexOpt is synchronized. // jobs because PackageDexOptimizer.performDexOpt is synchronized.
// checkProfiles is false to avoid merging profiles during boot which
// might interfere with background compilation (b/28612421).
// Unfortunately this will also means that "pm.dexopt.boot=speed-profile" will
// behave differently than "pm.dexopt.bg-dexopt=speed-profile" but that's a
// trade-off worth doing to save boot time work.
pm.performDexOpt(pkg, pm.performDexOpt(pkg,
/* instruction set */ null, /* instruction set */ null,
/* checkProfiles */ true, /* checkProfiles */ false,
PackageManagerService.REASON_BOOT, PackageManagerService.REASON_BOOT,
/* force */ false); /* force */ false);
} }

View File

@@ -7196,9 +7196,14 @@ public class PackageManagerService extends IPackageManager.Stub {
} }
} }
// checkProfiles is false to avoid merging profiles during boot which
// might interfere with background compilation (b/28612421).
// Unfortunately this will also means that "pm.dexopt.boot=speed-profile" will
// behave differently than "pm.dexopt.bg-dexopt=speed-profile" but that's a
// trade-off worth doing to save boot time work.
int dexOptStatus = performDexOptTraced(pkg.packageName, int dexOptStatus = performDexOptTraced(pkg.packageName,
null /* instructionSet */, null /* instructionSet */,
true /* checkProfiles */, false /* checkProfiles */,
getCompilerFilterForReason(causeFirstBoot ? REASON_FIRST_BOOT : REASON_BOOT), getCompilerFilterForReason(causeFirstBoot ? REASON_FIRST_BOOT : REASON_BOOT),
false /* force */); false /* force */);
switch (dexOptStatus) { switch (dexOptStatus) {