From 6a8e66c753abdb53847107c1cb2f13e9114c811d Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Thu, 20 Feb 2020 19:15:49 +0000 Subject: Remove JIT native debug info on failed commits. This could happen if single-implementation assumptions are invalid, and would result in temporary double entries in JIT debug info. Test: ./art/test.py -b -r --host --gcstress --jit --32 -t 068 Change-Id: I765c9310b6cc4fa440e4121780f8b9053388bd3d --- compiler/optimizing/optimizing_compiler.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 9978a6fa18..0344fc565a 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1295,6 +1295,8 @@ bool OptimizingCompiler::JitCompile(Thread* self, /* has_should_deoptimize_flag= */ false, cha_single_implementation_list)) { code_cache->Free(self, region, reserved_code.data(), reserved_data.data()); + MutexLock mu(self, *Locks::jit_lock_); + RemoveNativeDebugInfoForJit(ArrayRef(reinterpret_cast(&code), 1)); return false; } @@ -1403,6 +1405,8 @@ bool OptimizingCompiler::JitCompile(Thread* self, codegen->GetGraph()->HasShouldDeoptimizeFlag(), codegen->GetGraph()->GetCHASingleImplementationList())) { code_cache->Free(self, region, reserved_code.data(), reserved_data.data()); + MutexLock mu(self, *Locks::jit_lock_); + RemoveNativeDebugInfoForJit(ArrayRef(reinterpret_cast(&code), 1)); return false; } -- cgit v1.2.3-59-g8ed1b