From fb1b08cbb9c6ac149d75de16c14fdaa8b68baaa4 Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Thu, 12 May 2022 15:59:11 +0000 Subject: Revert "Reland^2 "Don't use AOT code for native methods for java debuggable runtime"" This reverts commit 5da52cd20ea0d24b038ae20c6c96aa22ac3a24a0. Reason for revert: https://ci.chromium.org/ui/p/art/builders/ci/host-x86_64-cdex-fast/5172/overview Change-Id: I9cebbaa145810547531a90af9da7961c0b6255d1 --- runtime/stack.cc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index 33d3668eb0..50a96d0ddf 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -800,20 +800,10 @@ void StackVisitor::WalkStack(bool include_transitions) { // between GenericJNI frame and JIT-compiled JNI stub; the entrypoint may have // changed since the frame was entered. The top quick frame tag indicates // GenericJNI here, otherwise it's either AOT-compiled or JNI-compiled JNI stub. - if (UNLIKELY(current_fragment->GetTopQuickFrameGenericJniTag())) { + if (UNLIKELY(current_fragment->GetTopQuickFrameTag())) { // The generic JNI does not have any method header. cur_oat_quick_method_header_ = nullptr; - } else if (UNLIKELY(current_fragment->GetTopQuickFrameJitJniTag())) { - // Should be JITed code. - Runtime* runtime = Runtime::Current(); - const void* code = runtime->GetJit()->GetCodeCache()->GetJniStubCode(method); - CHECK(code != nullptr) << method->PrettyMethod(); - cur_oat_quick_method_header_ = OatQuickMethodHeader::FromCodePointer(code); } else { - // We are sure we are not running GenericJni here. Though the entry point could still be - // GenericJnistub. The entry point is usually JITed, AOT or instrumentation stub when - // instrumentation is enabled. It could be lso a resolution stub if the class isn't - // visibly initialized yet. const void* existing_entry_point = method->GetEntryPointFromQuickCompiledCode(); CHECK(existing_entry_point != nullptr); Runtime* runtime = Runtime::Current(); @@ -829,11 +819,7 @@ void StackVisitor::WalkStack(bool include_transitions) { if (code != nullptr) { cur_oat_quick_method_header_ = OatQuickMethodHeader::FromEntryPoint(code); } else { - // This must be a JITted JNI stub frame. For non-debuggable runtimes we only generate - // JIT stubs if there are no AOT stubs for native methods. Since we checked for AOT - // code earlier, we must be running JITed code. For debuggable runtimes we might have - // JIT code even when AOT code is present but we tag SP in JITed JNI stubs - // in debuggable runtimes. This case is handled earlier. + // This must be a JITted JNI stub frame. CHECK(runtime->GetJit() != nullptr); code = runtime->GetJit()->GetCodeCache()->GetJniStubCode(method); CHECK(code != nullptr) << method->PrettyMethod(); -- cgit v1.2.3-59-g8ed1b