diff options
| author | 2016-03-17 20:24:29 +0000 | |
|---|---|---|
| committer | 2016-03-17 20:24:30 +0000 | |
| commit | e9e98f12eb5dbe81db90d56c65c8872cabaa855d (patch) | |
| tree | ac547775549ac52c77739b6c6d7f496bf3fa288d /runtime/class_linker.cc | |
| parent | 7f3397bec51bdeb7dfe76a17ea9d3279ddf79345 (diff) | |
| parent | f448016e70fa91269d3750384aab1ac98d7896fd (diff) | |
Merge "Do not JIT boot image during native-debugging (keep AOT code instead)."
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); } |