diff options
author | 2019-12-03 11:18:44 +0000 | |
---|---|---|
committer | 2020-01-16 16:25:28 +0000 | |
commit | 1c3c106fc896453e6e9b8dd5914eddf5b20d2416 (patch) | |
tree | 029a8276590131c7fe1c5daef153e90863c628a6 /compiler/utils/jni_macro_assembler.h | |
parent | 0330e38bbad6addc2f1c9ae2b61347e421db9c3f (diff) |
jni: Do not create a managed frame for @CriticalNative.
Omit managed frame for @CriticalNative methods, do not check
for exceptions and and make a tail call when possible.
Pass the method pointer in a hidden argument to prepare for
implementing late binding for @CriticalNative methods.
This changes only the JNI compiler, Generic JNI shall be
updated in a separate change.
Performance improvements reported by Golem (art-opt-cc):
x86 x86-64 arm arm64
NativeDowncallStaticCritical6 +17% +50% +88% +139%
NativeDowncallStaticCritical +37% +32% +103% +216%
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 112189621
Change-Id: I5758c8f478627f2eee8f615b4537a907c211b9f8
Diffstat (limited to 'compiler/utils/jni_macro_assembler.h')
-rw-r--r-- | compiler/utils/jni_macro_assembler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h index e6130cfc4c..bbe0f734ba 100644 --- a/compiler/utils/jni_macro_assembler.h +++ b/compiler/utils/jni_macro_assembler.h @@ -197,6 +197,9 @@ class JNIMacroAssembler : public DeletableArenaObject<kArenaAllocAssembler> { virtual void VerifyObject(ManagedRegister src, bool could_be_null) = 0; virtual void VerifyObject(FrameOffset src, bool could_be_null) = 0; + // Jump to address held at [base+offset] (used for tail calls). + virtual void Jump(ManagedRegister base, Offset offset, ManagedRegister scratch) = 0; + // Call to address held at [base+offset] virtual void Call(ManagedRegister base, Offset offset, ManagedRegister scratch) = 0; virtual void Call(FrameOffset base, Offset offset, ManagedRegister scratch) = 0; |