diff options
author | 2016-01-15 13:09:34 +0000 | |
---|---|---|
committer | 2016-01-18 14:35:14 +0000 | |
commit | fffbee4d158259633ec7b7f712eaf75be86bd4e5 (patch) | |
tree | 05b9ae8b23be722cf8c2a6a979cc3706437ecf71 /compiler/jit/jit_compiler.cc | |
parent | 55380bbe098bace4375d77a2b77d05ef88dfe6f6 (diff) |
Report types loaded during init to the native debugger
The runtime loads a lot of type before it creates the jit from the
boot image and from hard coded source code (e.g. primitive arrays).
This change emits type information for these types after the jit has
been created. At the same time we remove the type info generation
that happens during AOT compilation because that type information can
be modified by a class loader at runtime.
Change-Id: Ie5b3b3df9d01c7200a1f670a98d9cbee796234e9
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r-- | compiler/jit/jit_compiler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index a4b9c6c0b9..8fdbf4a3f7 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -67,12 +67,13 @@ extern "C" bool jit_compile_method(void* handle, ArtMethod* method, Thread* self return jit_compiler->CompileMethod(self, method); } -extern "C" void jit_type_loaded(void* handle, mirror::Class* type) +extern "C" void jit_types_loaded(void* handle, mirror::Class** types, size_t count) SHARED_REQUIRES(Locks::mutator_lock_) { auto* jit_compiler = reinterpret_cast<JitCompiler*>(handle); DCHECK(jit_compiler != nullptr); if (jit_compiler->GetCompilerOptions()->GetGenerateDebugInfo()) { - ArrayRef<const uint8_t> elf_file = dwarf::WriteDebugElfFileForClass(kRuntimeISA, type); + const ArrayRef<mirror::Class*> types_array(types, count); + ArrayRef<const uint8_t> elf_file = dwarf::WriteDebugElfFileForClasses(kRuntimeISA, types_array); CreateJITCodeEntry(std::unique_ptr<const uint8_t[]>(elf_file.data()), elf_file.size()); } } |