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.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/jit_patches_arm64.h') diff --git a/compiler/optimizing/jit_patches_arm64.h b/compiler/optimizing/jit_patches_arm64.h index f5d92804ac..e13060210a 100644 --- a/compiler/optimizing/jit_patches_arm64.h +++ b/compiler/optimizing/jit_patches_arm64.h @@ -20,10 +20,12 @@ #include "base/arena_allocator.h" #include "base/arena_containers.h" #include "dex/dex_file.h" +#include "dex/proto_reference.h" #include "dex/string_reference.h" #include "dex/type_reference.h" #include "handle.h" #include "mirror/class.h" +#include "mirror/method_type.h" #include "mirror/string.h" #include "utils/arm64/assembler_arm64.h" @@ -56,7 +58,9 @@ class JitPatchesARM64 { jit_string_patches_(StringReferenceValueComparator(), allocator->Adapter(kArenaAllocCodeGenerator)), jit_class_patches_(TypeReferenceValueComparator(), - allocator->Adapter(kArenaAllocCodeGenerator)) { + allocator->Adapter(kArenaAllocCodeGenerator)), + jit_method_type_patches_(ProtoReferenceValueComparator(), + allocator->Adapter(kArenaAllocCodeGenerator)) { } using Uint64ToLiteralMap = ArenaSafeMap*>; @@ -67,6 +71,9 @@ class JitPatchesARM64 { using TypeToLiteralMap = ArenaSafeMap*, TypeReferenceValueComparator>; + using ProtoToLiteralMap = ArenaSafeMap*, + ProtoReferenceValueComparator>; vixl::aarch64::Literal* DeduplicateUint32Literal(uint32_t value); vixl::aarch64::Literal* DeduplicateUint64Literal(uint64_t value); @@ -81,6 +88,11 @@ class JitPatchesARM64 { dex::TypeIndex type_index, Handle handle, CodeGenerationData* code_generation_data); + vixl::aarch64::Literal* DeduplicateJitMethodTypeLiteral( + const DexFile& dex_file, + dex::ProtoIndex proto_index, + Handle handle, + CodeGenerationData* code_generation_data); void EmitJitRootPatches(uint8_t* code, const uint8_t* roots_data, @@ -99,6 +111,8 @@ class JitPatchesARM64 { StringToLiteralMap jit_string_patches_; // Patches for class literals in JIT compiled code. TypeToLiteralMap jit_class_patches_; + // Patches for MethodType literals in JIT compiled code. + ProtoToLiteralMap jit_method_type_patches_; }; } // namespace arm64 -- cgit v1.2.3-59-g8ed1b