JIT mini-debug-info: Allocate entries in the JIT data space.
Test: test.py -b --host --jit
Test: device boots
Bug: 119800099
Change-Id: I7efa1e6e6660239cbd6438b829e08dd9cd079343
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index f01554a..0bdab0b 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -123,8 +123,7 @@
return jit_compiler;
}
-void JitCompiler::TypesLoaded(mirror::Class** types, size_t count)
- REQUIRES_SHARED(Locks::mutator_lock_) {
+void JitCompiler::TypesLoaded(mirror::Class** types, size_t count) {
const CompilerOptions& compiler_options = GetCompilerOptions();
if (compiler_options.GetGenerateDebugInfo()) {
InstructionSet isa = compiler_options.GetInstructionSet();
@@ -134,6 +133,7 @@
debug::WriteDebugElfFileForClasses(isa, features, types_array);
// NB: Don't allow packing since it would remove non-backtrace data.
+ MutexLock mu(Thread::Current(), *Locks::jit_lock_);
AddNativeDebugInfoForJit(/*code_ptr=*/ nullptr, elf_file, /*allow_packing=*/ false);
}
}