diff options
Diffstat (limited to 'runtime/class_linker.cc')
| -rw-r--r-- | runtime/class_linker.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index d0a784dfc9..d8e309d57e 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -2722,13 +2722,18 @@ bool ClassLinker::ShouldUseInterpreterEntrypoint(ArtMethod* method, const void* return true; } - if (runtime->UseJit() && runtime->GetJit()->JitAtFirstUse()) { - // The force JIT uses the interpreter entry point to execute the JIT. - return true; + if (runtime->IsNativeDebuggable()) { + DCHECK(runtime->UseJit() && runtime->GetJit()->JitAtFirstUse()); + // If we are doing native debugging, ignore application's AOT code, + // since we want to JIT it with extra stackmaps for native debugging. + // On the other hand, keep all AOT code from the boot image, since the + // blocking JIT would results in non-negligible performance impact. + return !runtime->GetHeap()->IsInBootImageOatFile(quick_code); } if (Dbg::IsDebuggerActive()) { - // Boot image classes are AOT-compiled as non-debuggable. + // Boot image classes may be AOT-compiled as non-debuggable. + // This is not suitable for the Java debugger, so ignore the AOT code. return runtime->GetHeap()->IsInBootImageOatFile(quick_code); } |