Add verify-profile compiler filter
Only verifies and dex2dex compiles classes in the profile. Goal
is to reduce application launch time.
~2x faster than interpret-only for Facebook.
Bug: 27688727
(cherry picked from commit a079e3aa62cceb76c1c1811e6e09bcaf75e20289)
Change-Id: Iad5aa1adee3aa6c2408820e8cbbab2d4412021b8
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index d8e309d..e2ef7ac 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3964,7 +3964,12 @@
oat_file_class_status = oat_dex_file->GetOatClass(class_def_index).GetStatus();
if (oat_file_class_status == mirror::Class::kStatusVerified ||
oat_file_class_status == mirror::Class::kStatusInitialized) {
- return true;
+ return true;
+ }
+ // If we only verified a subset of the classes at compile time, we can end up with classes that
+ // were resolved by the verifier.
+ if (oat_file_class_status == mirror::Class::kStatusResolved) {
+ return false;
}
if (oat_file_class_status == mirror::Class::kStatusRetryVerificationAtRuntime) {
// Compile time verification failed with a soft error. Compile time verification can fail