diff options
Diffstat (limited to 'runtime/jit/jit.cc')
| -rw-r--r-- | runtime/jit/jit.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc index 05668a97b3..2a89077388 100644 --- a/runtime/jit/jit.cc +++ b/runtime/jit/jit.cc @@ -127,6 +127,13 @@ bool Jit::LoadCompiler(std::string* error_msg) { *error_msg = "JIT couldn't find jit_compile_method entry point"; return false; } + jit_type_loaded_ = reinterpret_cast<void (*)(void*, mirror::Class*)>( + dlsym(jit_library_handle_, "jit_type_loaded")); + if (jit_type_loaded_ == nullptr) { + dlclose(jit_library_handle_); + *error_msg = "JIT couldn't find jit_type_loaded entry point"; + return false; + } CompilerCallbacks* callbacks = nullptr; bool will_generate_debug_symbols = false; VLOG(jit) << "Calling JitLoad interpreter_only=" @@ -214,5 +221,13 @@ void Jit::CreateInstrumentationCache(size_t compile_threshold, size_t warmup_thr new jit::JitInstrumentationCache(compile_threshold, warmup_threshold)); } +void Jit::NewTypeLoadedIfUsingJit(mirror::Class* type) { + jit::Jit* jit = Runtime::Current()->GetJit(); + if (jit != nullptr && jit->generate_debug_info_) { + DCHECK(jit->jit_type_loaded_ != nullptr); + jit->jit_type_loaded_(jit->jit_compiler_handle_, type); + } +} + } // namespace jit } // namespace art |