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
Change-Id: Ic9979c4f7ba4930298d0983c4e3c70c63500213f
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 6a2b702..53d952f 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3976,7 +3976,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