summaryrefslogtreecommitdiff
path: root/compiler/utils/jni_macro_assembler.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-12-07 15:42:12 +0100
committer VladimĂ­r Marko <vmarko@google.com> 2023-04-04 07:25:29 +0000
commit41c3de26503b7e9ff8cd3dd480cf12a8cca8af83 (patch)
tree692424dc0ad7b5dbef26833e8e2ffbbeee23c5a3 /compiler/utils/jni_macro_assembler.h
parent39cbdab22265d0b20dca1941fdf240225c7f54f2 (diff)
JNI: Fast-path for decoding returned jobject.
Results for the timeGetBytesAscii#EMPTY benchmark from the libcore's StringToBytesBenchmark suite on blueline-userdebug with the cpu frequencies fixed at 1420800 (cpus 0-3; little) and 1459200 (cpus 4-7; big): 32-bit little: ~415 -> ~390 64-bit little: ~415 -> ~390 32-bit big: ~180 -> ~170 64-bit big: ~180 -> ~170 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --debug --ndebug Test: run-gtests.sh Test: testrunner.py --target --optimizing --debug --ndebug Bug: 172332525 Change-Id: I0e19d583e5141e99a8b8c6fd9ae125fe7c9e02e7
Diffstat (limited to 'compiler/utils/jni_macro_assembler.h')
-rw-r--r--compiler/utils/jni_macro_assembler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h
index 15a4c3fe67..0c729705dc 100644
--- a/compiler/utils/jni_macro_assembler.h
+++ b/compiler/utils/jni_macro_assembler.h
@@ -158,6 +158,11 @@ class JNIMacroAssembler : public DeletableArenaObject<kArenaAllocAssembler> {
virtual void GetCurrentThread(ManagedRegister dest) = 0;
virtual void GetCurrentThread(FrameOffset dest_offset) = 0;
+ // Decode JNI transition or local `jobject`. For (weak) global `jobject`, jump to slow path.
+ virtual void DecodeJNITransitionOrLocalJObject(ManagedRegister reg,
+ JNIMacroLabel* slow_path,
+ JNIMacroLabel* resume) = 0;
+
// Heap::VerifyObject on src. In some cases (such as a reference to this) we
// know that src may not be null.
virtual void VerifyObject(ManagedRegister src, bool could_be_null) = 0;