summaryrefslogtreecommitdiff
path: root/compiler/image_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r--compiler/image_writer.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index c72edb18a3..d2dd30d8e6 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -1078,7 +1078,7 @@ ObjectArray<Object>* ImageWriter::CreateImageRoots(size_t oat_index) const {
}
Handle<ObjectArray<Object>> dex_caches(
hs.NewHandle(ObjectArray<Object>::Alloc(self, object_array_class.Get(), dex_cache_count)));
- CHECK(dex_caches.Get() != nullptr) << "Failed to allocate a dex cache array.";
+ CHECK(dex_caches != nullptr) << "Failed to allocate a dex cache array.";
{
ReaderMutexLock mu(self, *Locks::dex_lock_);
size_t non_image_dex_caches = 0;
@@ -2254,6 +2254,14 @@ void ImageWriter::FixupDexCache(mirror::DexCache* orig_dex_cache,
orig_dex_cache->FixupResolvedMethodTypes(NativeCopyLocation(orig_method_types, orig_dex_cache),
ImageAddressVisitor(this));
}
+ GcRoot<mirror::CallSite>* orig_call_sites = orig_dex_cache->GetResolvedCallSites();
+ if (orig_call_sites != nullptr) {
+ copy_dex_cache->SetFieldPtrWithSize<false>(mirror::DexCache::ResolvedCallSitesOffset(),
+ NativeLocationInImage(orig_call_sites),
+ PointerSize::k64);
+ orig_dex_cache->FixupResolvedCallSites(NativeCopyLocation(orig_call_sites, orig_dex_cache),
+ ImageAddressVisitor(this));
+ }
// Remove the DexFile pointers. They will be fixed up when the runtime loads the oat file. Leaving
// compiler pointers in here will make the output non-deterministic.