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 --- compiler/jni/quick/jni_compiler.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'compiler/jni/quick/jni_compiler.cc') diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc index b88ebaf956..6cb50211e1 100644 --- a/compiler/jni/quick/jni_compiler.cc +++ b/compiler/jni/quick/jni_compiler.cc @@ -95,13 +95,6 @@ static JniCompiledMethod ArtJniCompileMethodInternal(const CompilerOptions& comp const InstructionSetFeatures* instruction_set_features = compiler_options.GetInstructionSetFeatures(); - // When walking the stack the top frame doesn't have a pc associated with it. We then depend on - // the invariant that we don't have JITed code when AOT code is available. In debuggable runtimes - // this invariant doesn't hold. So we tag the SP for JITed code to indentify if we are executing - // JITed code or AOT code. Since tagging involves additional instructions we tag only in - // debuggable runtimes. - bool should_tag_sp = compiler_options.GetDebuggable() && compiler_options.IsJitCompiler(); - // i.e. if the method was annotated with @FastNative const bool is_fast_native = (access_flags & kAccFastNative) != 0u; @@ -226,7 +219,7 @@ static JniCompiledMethod ArtJniCompileMethodInternal(const CompilerOptions& comp // because garbage collections are disabled within the execution of a // @CriticalNative method. if (LIKELY(!is_critical_native)) { - __ StoreStackPointerToThread(Thread::TopOfManagedStackOffset(), should_tag_sp); + __ StoreStackPointerToThread(Thread::TopOfManagedStackOffset()); } // 2. Lock the object (if synchronized) and transition out of Runnable (if normal native). @@ -612,7 +605,7 @@ static JniCompiledMethod ArtJniCompileMethodInternal(const CompilerOptions& comp if (reference_return) { // Suspend check entry point overwrites top of managed stack and leaves it clobbered. // We need to restore the top for subsequent runtime call to `JniDecodeReferenceResult()`. - __ StoreStackPointerToThread(Thread::TopOfManagedStackOffset(), should_tag_sp); + __ StoreStackPointerToThread(Thread::TopOfManagedStackOffset()); } if (reference_return && main_out_arg_size != 0) { __ IncreaseFrameSize(main_out_arg_size); -- cgit v1.2.3-59-g8ed1b