Load app images
Support in-place patching of the app image based on boot image
location and app oat location. Only loads for art run test so far
since we do not automatically generate app images for app installs.
N5 maps launch time (~200 runs):
Before: 930ms
After: 878.18ms
After + image class table: 864.57ms
TODO:
Oatdump support.
Store class loaders as class roots in image.
Bug: 22858531
Change-Id: I9cbc645645e62ea2ed1ad8e139e91af7d88514c1
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 0be2fa2..440e796 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -477,6 +477,17 @@
// Returns whether the method has any compiled code, JIT or AOT.
bool HasAnyCompiledCode() SHARED_REQUIRES(Locks::mutator_lock_);
+
+ // Update heap objects and non-entrypoint pointers by the passed in visitor for image relocation.
+ // Does not use read barrier.
+ template <typename Visitor>
+ ALWAYS_INLINE void UpdateObjectsForImageRelocation(const Visitor& visitor)
+ SHARED_REQUIRES(Locks::mutator_lock_);
+
+ // Update entry points by passing them through the visitor.
+ template <typename Visitor>
+ ALWAYS_INLINE void UpdateEntrypoints(const Visitor& visitor);
+
protected:
// Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses".
// The class we are a part of.