From c2632ac7512d21407f86c10c8160854e4ff9466f Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Fri, 13 May 2022 14:37:52 +0000 Subject: Reland^3 "Don't use AOT code for native methods for java debuggable runtime" This reverts commit fb1b08cbb9c6ac149d75de16c14fdaa8b68baaa4. Reason for revert: Reland after a fix. We had to update untagging in jni_dlsym_lookup_stub as well. Change-Id: Id936e9e60f9e87e96f1a9a79cd2118631ad1616b --- compiler/utils/jni_macro_assembler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/utils/jni_macro_assembler.h') diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h index 7022e3df92..c8c713ae67 100644 --- a/compiler/utils/jni_macro_assembler.h +++ b/compiler/utils/jni_macro_assembler.h @@ -126,7 +126,11 @@ class JNIMacroAssembler : public DeletableArenaObject { virtual void StoreStackOffsetToThread(ThreadOffset thr_offs, FrameOffset fr_offs) = 0; - virtual void StoreStackPointerToThread(ThreadOffset thr_offs) = 0; + // Stores stack pointer by tagging it if required so we can walk the stack. In debuggable runtimes + // we use tag to tell if we are using JITed code or AOT code. In non-debuggable runtimes we never + // use JITed code when AOT code is present. So checking for AOT code is sufficient to detect which + // code is being executed. We avoid tagging in non-debuggable runtimes to reduce instructions. + virtual void StoreStackPointerToThread(ThreadOffset thr_offs, bool tag_sp) = 0; virtual void StoreSpanning(FrameOffset dest, ManagedRegister src, -- cgit v1.2.3-59-g8ed1b