From ba201d247dbcf4c30a9c05d29ea51fe8639732e4 Mon Sep 17 00:00:00 2001 From: Almaz Mingaleev Date: Tue, 26 Nov 2024 10:40:13 +0000 Subject: Revert^2 "arm64: Store resolved MethodType-s in .bss." This reverts commit fad4678f3ae48d84b7ed1c842b03a023e4f2cb37. Bug: 380651440 bug: 297147201 Test: atest CtsLibcoreOjTestCases on a redfin device flashed Test: with ab/12108082: test crashes w/o WriteBarrier line Test: and passes w/ it. Change-Id: Ibdfc090e3c2b693c1bb3b160a64c9f94448e18ec --- compiler/optimizing/jit_patches_arm64.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'compiler/optimizing/jit_patches_arm64.cc') diff --git a/compiler/optimizing/jit_patches_arm64.cc b/compiler/optimizing/jit_patches_arm64.cc index 76ba182acb..193e913945 100644 --- a/compiler/optimizing/jit_patches_arm64.cc +++ b/compiler/optimizing/jit_patches_arm64.cc @@ -67,6 +67,12 @@ void JitPatchesARM64::EmitJitRootPatches( uint64_t index_in_table = code_generation_data.GetJitClassRootIndex(type_reference); PatchJitRootUse(code, roots_data, table_entry_literal, index_in_table); } + for (const auto& entry : jit_method_type_patches_) { + const ProtoReference& proto_reference = entry.first; + vixl::aarch64::Literal* table_entry_literal = entry.second; + uint64_t index_in_table = code_generation_data.GetJitMethodTypeRootIndex(proto_reference); + PatchJitRootUse(code, roots_data, table_entry_literal, index_in_table); + } } vixl::aarch64::Literal* JitPatchesARM64::DeduplicateBootImageAddressLiteral( @@ -100,5 +106,18 @@ vixl::aarch64::Literal* JitPatchesARM64::DeduplicateJitClassLiteral( }); } +vixl::aarch64::Literal* JitPatchesARM64::DeduplicateJitMethodTypeLiteral( + const DexFile& dex_file, + dex::ProtoIndex proto_index, + Handle handle, + CodeGenerationData* code_generation_data) { + code_generation_data->ReserveJitMethodTypeRoot(ProtoReference(&dex_file, proto_index), handle); + return jit_method_type_patches_.GetOrCreate( + ProtoReference(&dex_file, proto_index), + [this]() { + return GetVIXLAssembler()->CreateLiteralDestroyedWithPool(/* value= */ 0u); + }); +} + } // namespace arm64 } // namespace art -- cgit v1.2.3-59-g8ed1b