Remove some more read barriers in image relocation
Bug: 26786304
Bug: 22858531
Change-Id: I70dacae7657ebf6dac2b3dad7726eebe5a2b2649
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 891e280..f607923 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -1041,7 +1041,7 @@
auto* dex_caches = image_header.GetImageRoot<kWithoutReadBarrier>(ImageHeader::kDexCaches)->
AsObjectArray<mirror::DexCache>();
for (int32_t i = 0, count = dex_caches->GetLength(); i < count; ++i) {
- mirror::DexCache* dex_cache = dex_caches->Get(i);
+ mirror::DexCache* dex_cache = dex_caches->Get<kVerifyNone, kWithoutReadBarrier>(i);
// Fix up dex cache pointers.
GcRoot<mirror::String>* strings = dex_cache->GetStrings();
if (strings != nullptr) {
@@ -1049,7 +1049,7 @@
if (strings != new_strings) {
dex_cache->SetFieldPtr64<false>(mirror::DexCache::StringsOffset(), new_strings);
}
- dex_cache->FixupStrings(new_strings, fixup_adapter);
+ dex_cache->FixupStrings<kWithoutReadBarrier>(new_strings, fixup_adapter);
}
GcRoot<mirror::Class>* types = dex_cache->GetResolvedTypes();
if (types != nullptr) {
@@ -1057,7 +1057,7 @@
if (types != new_types) {
dex_cache->SetFieldPtr64<false>(mirror::DexCache::ResolvedTypesOffset(), new_types);
}
- dex_cache->FixupResolvedTypes(new_types, fixup_adapter);
+ dex_cache->FixupResolvedTypes<kWithoutReadBarrier>(new_types, fixup_adapter);
}
ArtMethod** methods = dex_cache->GetResolvedMethods();
if (methods != nullptr) {