diff options
author | 2016-01-05 14:29:02 +0000 | |
---|---|---|
committer | 2016-01-18 14:03:05 +0000 | |
commit | 160e6df5debaf77223eebddb8a4e3f7c5e729ad0 (patch) | |
tree | b28c9f1402e7c47383af28181d3614c2bf5012ef /compiler/jit/jit_compiler.cc | |
parent | 8422edd7af342a955f17639ab827cf062ef8965e (diff) |
Report loaded classes to native debugger.
Change-Id: Iee902a9ed8fa7545ba3e6afc32f285aa350a5383
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r-- | compiler/jit/jit_compiler.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index bc51ed6e6a..a4b9c6c0b9 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -28,6 +28,8 @@ #include "dex/quick_compiler_callbacks.h" #include "driver/compiler_driver.h" #include "driver/compiler_options.h" +#include "elf_writer_debug.h" +#include "jit/debugger_interface.h" #include "jit/jit.h" #include "jit/jit_code_cache.h" #include "oat_file-inl.h" @@ -65,6 +67,16 @@ 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) + 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); + CreateJITCodeEntry(std::unique_ptr<const uint8_t[]>(elf_file.data()), elf_file.size()); + } +} + // Callers of this method assume it has NO_RETURN. NO_RETURN static void Usage(const char* fmt, ...) { va_list ap; |