From 0d127e10de0b06ec22d8e855d1d62773c4ede101 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Wed, 5 Jul 2017 17:01:11 +0100 Subject: Do not refresh the Marking Register in CriticalNative methods. CriticalNative methods shall not be suspended and hence do not require MR to be refreshed in compiled JNI code. This change is for ARM and ARM64 only. Impact on Critical Native benchmarks times (median of 10 runs, lower is better): * angler-userdebug - ARMv7 ** All cores NativeDowncallStaticCritical -2.78% NativeDowncallStaticCritical6 -1.79% ** Little cores only NativeDowncallStaticCritical -1.66% NativeDowncallStaticCritical6 -1.27% ** Big cores only NativeDowncallStaticCritical -2.66% NativeDowncallStaticCritical6 -1.70% * angler-userdebug - ARMv8 ** All cores NativeDowncallStaticCritical -3.52% NativeDowncallStaticCritical6 -1.79% ** Little cores only NativeDowncallStaticCritical -1.63% NativeDowncallStaticCritical6 -1.27% ** Big cores only NativeDowncallStaticCritical -3.87% NativeDowncallStaticCritical6 -1.75% Test: m test-art-target Test: m test-art-target with tree built with ART_USE_READ_BARRIER=false Test: m test-art-host-gtest Test: ARM64 device boot test Test: ARM device boot test Bug: b/37707231 Change-Id: I95d61b9ecde0afffdd5fd44763b19caa06025ec8 --- compiler/utils/jni_macro_assembler.h | 8 +++++++- 1 file changed, 7 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 a8ca1119e5..72f1ce05ce 100644 --- a/compiler/utils/jni_macro_assembler.h +++ b/compiler/utils/jni_macro_assembler.h @@ -66,7 +66,13 @@ class JNIMacroAssembler : public DeletableArenaObject { const ManagedRegisterEntrySpills& entry_spills) = 0; // Emit code that will remove an activation from the stack - virtual void RemoveFrame(size_t frame_size, ArrayRef callee_save_regs) = 0; + // + // Argument `may_suspend` must be `true` if the compiled method may be + // suspended during its execution (otherwise `false`, if it is impossible + // to suspend during its execution). + virtual void RemoveFrame(size_t frame_size, + ArrayRef callee_save_regs, + bool may_suspend) = 0; virtual void IncreaseFrameSize(size_t adjust) = 0; virtual void DecreaseFrameSize(size_t adjust) = 0; -- cgit v1.2.3-59-g8ed1b