OSDN Git Service

Better handling of various types of compilation in DexOptimizer
authorCalin Juravle <calin@google.com>
Thu, 25 Feb 2016 15:26:20 +0000 (15:26 +0000)
committerCalin Juravle <calin@google.com>
Wed, 2 Mar 2016 18:27:10 +0000 (18:27 +0000)
commit693f997cc8b8c2ba8d3ed29627b2641dd86392a5
tree4e9273067b25617bc6fb74bba3bbef21ca63d0d2
parent78f335e7537184093bd78fc22a1ce64c34bd01a5
Better handling of various types of compilation in DexOptimizer

From the runtime perspective extract-only/profile-guide-compiled/fully-
compiled oat files are up-to-date and don't need dex2oat. However,
wihout knowing the exact "class" of the aot file we are not able to do a
full compilation of something previously only-extracted, or limit
profile-guide compilation to only previously profile-guide or extract-
only oat files.

GetDexOptNeeded now accepts a mask of desired types of compilation
that the runtime takes into account when advising what's needed.

This CL adds the necessary handling in DexOptimizer.

Also:
- removes the contraint to use extract-only oat files only when
profiles are enabled.
- removes mDexOptPerformed which interfere with the different types of
compilation and only saved a call to GetDexOptNeeded.

Bug: 27189430
Change-Id: Iced2bdcc3aa7866ff888a3bace43f4b71fffb353
core/java/android/content/pm/PackageParser.java
core/java/com/android/internal/os/ZygoteInit.java
services/core/java/com/android/server/pm/OtaDexoptService.java
services/core/java/com/android/server/pm/PackageDexOptimizer.java
services/core/java/com/android/server/pm/PackageManagerService.java