diff options
author | 2015-06-09 17:50:29 -0700 | |
---|---|---|
committer | 2015-06-11 14:56:08 -0700 | |
commit | d39645e22b8db1767cf64dc1200a9e4b2f939ed2 (patch) | |
tree | fd6488a428600f222c5a411e91ed9f1f3a280b05 /patchoat/patchoat.h | |
parent | 15306dcd03208f062737239753ab1eccfe91403f (diff) |
Move image intern table into image
Previously we recreated this intern table during runtime startup.
This added 50-100ms of boot time.
Fixed bug where we didn't copy over hashcodes into the image.
Deleted some stale code.
(cherry picked from commit fac3a390a247fe33d4873773d742aad4cc100118)
Bug: 20727525
Bug: 19569780
Change-Id: I08959e9aa2a73cedb52f393033e2ffea3a26e76b
Diffstat (limited to 'patchoat/patchoat.h')
-rw-r--r-- | patchoat/patchoat.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h index 7b9c8bd508..23abca8c7e 100644 --- a/patchoat/patchoat.h +++ b/patchoat/patchoat.h @@ -116,6 +116,8 @@ class PatchOat { bool PatchImage() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void PatchArtFields(const ImageHeader* image_header) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void PatchArtMethods(const ImageHeader* image_header) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void PatchInternedStrings(const ImageHeader* image_header) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void PatchDexFileArrays(mirror::ObjectArray<mirror::Object>* img_roots) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -123,7 +125,7 @@ class PatchOat { bool WriteImage(File* out); template <typename T> - T* RelocatedCopyOf(T* obj) { + T* RelocatedCopyOf(T* obj) const { if (obj == nullptr) { return nullptr; } @@ -136,7 +138,7 @@ class PatchOat { } template <typename T> - T* RelocatedAddressOfPointer(T* obj) { + T* RelocatedAddressOfPointer(T* obj) const { if (obj == nullptr) { return obj; } @@ -149,7 +151,7 @@ class PatchOat { } template <typename T> - T RelocatedAddressOfIntPointer(T obj) { + T RelocatedAddressOfIntPointer(T obj) const { if (obj == 0) { return obj; } @@ -199,6 +201,7 @@ class PatchOat { TimingLogger* timings_; + friend class FixupRootVisitor; DISALLOW_IMPLICIT_CONSTRUCTORS(PatchOat); }; |