Enable PackageManagerService snapshots

Bug: 179388643

Throw the switch that enables PackageManagerService snapshots.  Revert
this CL if the snapshots introduce field failures.

This improves performance on the multiUser tests startUser and
stopUser (switchUser is broken for different reasons right now).  The
"disabled" values are taken with baseline code and snapshots
disabled.  The "baseline" values are taken with baseline code and
snapshots enabled.  The "proposed" values are taken with the current
CL active.

              disabled    baseline    (delta)      intent    (delta)
boottime         28948       29169        221       28396       -552
pss             294300      334060      39760      299919       5619
rss             561201      614756      53555      566610       5409
start             4287        3894       -393        2461      -1826
stop              2847        2093       -754        1223      -1624

Test: atest
 * CtsContentTestCases:IntentFilterTest
 * CtsDynamicMimeHostTestCases
 * CtsRoleTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests
 * UserLifecycleTests#startUser
 * UserLifecycleTests#stopUser
 * UserLifecycleTests#switchUser
 * FrameworksServicesTests:WatcherTest
 * android.appsecurity.cts.EphemeralTest
 * android.appsecurity.cts.InstantAppUserTest

Change-Id: I8dc579301d11c29f94a1861694be3c39f6ebf1ca
This commit is contained in:
Lee Shombert
2021-05-12 08:25:53 -07:00
parent 99173ce6b9
commit f75c4a4477

View File

@@ -4924,7 +4924,7 @@ public class PackageManagerService extends IPackageManager.Stub
// The snapshot disable/enable switch. An image with the flag set true uses snapshots
// and an image with the flag set false does not use snapshots.
private static final boolean SNAPSHOT_ENABLED = false;
private static final boolean SNAPSHOT_ENABLED = true;
// The default auto-cork delay for snapshots. This is 1s.
private static final long SNAPSHOT_AUTOCORK_DELAY_MS = TimeUnit.SECONDS.toMillis(1);