diff options
| author | Vladimir Marko <vmarko@google.com> | 2018-04-25 17:27:45 +0100 |
|---|---|---|
| committer | Vladimir Marko <vmarko@google.com> | 2018-07-25 18:34:19 +0100 |
| commit | 450f1d0fa0c40198e63c3e016f02e40ac854b0cb (patch) | |
| tree | 0606a5c722be0d706242c015cb1218021c5c1309 /compiler/optimizing/code_generator_arm_vixl.h | |
| parent | da6220a29fae95f17edd5374dc6bc2d4870a84da (diff) | |
| download | art-450f1d0fa0c40198e63c3e016f02e40ac854b0cb.tar.gz art-450f1d0fa0c40198e63c3e016f02e40ac854b0cb.tar.bz2 art-450f1d0fa0c40198e63c3e016f02e40ac854b0cb.zip | |
ARM/ARM64: Use introspection marking for JITted code.
Impact on Golem benchmarks is within noise.
Test: m test-art-host-gtest
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing --jit
Bug: 36141117
Change-Id: Idf5177ee5cd34e2034d298a7907240b3e3e12d82
Diffstat (limited to 'compiler/optimizing/code_generator_arm_vixl.h')
| -rw-r--r-- | compiler/optimizing/code_generator_arm_vixl.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h index fc8cf98173..ef82f2e904 100644 --- a/compiler/optimizing/code_generator_arm_vixl.h +++ b/compiler/optimizing/code_generator_arm_vixl.h @@ -589,9 +589,9 @@ class CodeGeneratorARMVIXL : public CodeGenerator { PcRelativePatchInfo* NewStringBssEntryPatch(const DexFile& dex_file, dex::StringIndex string_index); - // Add a new baker read barrier patch and return the label to be bound - // before the BNE instruction. - vixl::aarch32::Label* NewBakerReadBarrierPatch(uint32_t custom_data); + // Emit the BNE instruction for baker read barrier and record + // the associated patch for AOT or slow path for JIT. + void EmitBakerReadBarrierBne(uint32_t custom_data); VIXLUInt32Literal* DeduplicateBootImageAddressLiteral(uint32_t address); VIXLUInt32Literal* DeduplicateJitStringLiteral(const DexFile& dex_file, @@ -916,6 +916,19 @@ class CodeGeneratorARMVIXL : public CodeGenerator { // Patches for class literals in JIT compiled code. TypeToLiteralMap jit_class_patches_; + // Baker read barrier slow paths, mapping custom data (uint32_t) to label. + // Wrap the label to work around vixl::aarch32::Label being non-copyable + // and non-moveable and as such unusable in ArenaSafeMap<>. + struct LabelWrapper { + LabelWrapper(const LabelWrapper& src) + : label() { + DCHECK(!src.label.IsReferenced() && !src.label.IsBound()); + } + LabelWrapper() = default; + vixl::aarch32::Label label; + }; + ArenaSafeMap<uint32_t, LabelWrapper> jit_baker_read_barrier_slow_paths_; + friend class linker::Thumb2RelativePatcherTest; DISALLOW_COPY_AND_ASSIGN(CodeGeneratorARMVIXL); }; |
