Reduce AOT initialization.
When compiling apps there is no need to resolve all types in the dex file, just
those declared in the dex file. There's also no need to initialize static
fields if we can only leave the class in a verified state.
Increase use of CompilerDriver::IsImage.
Move timing of dex2oat setup to before Runtime::Create.
On run-test 056 the performance improvement is an order of magnitude, for
ThinkFree dex2oat time is dominated by compilation and this change has no
effect.
Bug 10316099.
Change-Id: Ibdd7caa43284e7448e6a56d810967100ae4a7898
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index d0cc562..fdf17a2 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -443,7 +443,7 @@
bool InitializeSuperClass(mirror::Class* klass, bool can_run_clinit, bool can_init_fields)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Initialize static fields, returns true if fields were initialized.
- bool InitializeStaticFields(mirror::Class* klass)
+ bool InitializeStaticFields(mirror::Class* klass, bool can_init_statics)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
bool IsSameDescriptorInDifferentClassContexts(const char* descriptor,