From bab6beb1f1299c13a0be5fbb4344facb6d7be7e3 Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Fri, 21 Oct 2022 13:28:05 +0000 Subject: Update method exit hooks from JITed code to not use Stack visitor Using NthCallerStackVisitor is expensive since that involves decoding method header and other tasks that are reasonably expensive especially when called on every method exit. When calling method exit hooks from JITed code a lot of this information like the frame_size, calling method are already known and can be directly passed to the method exit hook instead of computing them. Locally this change improves the performance by 70% on debuggable-cc config of golem benchmarks. Bug: 253232638 Test: art/test.py Change-Id: I3a1d80748c6d85e5fa1d3bd4aec0b29962ba0156 --- compiler/utils/jni_macro_assembler.h | 2 ++ 1 file changed, 2 insertions(+) (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 36de012495..a91176c785 100644 --- a/compiler/utils/jni_macro_assembler.h +++ b/compiler/utils/jni_macro_assembler.h @@ -215,6 +215,8 @@ class JNIMacroAssembler : public DeletableArenaObject { ManagedRegister scratch, size_t size) = 0; + virtual void Move(ManagedRegister dst, size_t value) = 0; + virtual void MemoryBarrier(ManagedRegister scratch) = 0; // Sign extension -- cgit v1.2.3-59-g8ed1b