diff options
author | 2021-11-17 13:16:35 +0000 | |
---|---|---|
committer | 2021-11-22 15:28:02 +0000 | |
commit | c17656bcf477e57d59ff051037c96994fd0ac8f2 (patch) | |
tree | 78704cdca54c7437a34c9ca4b9da27ed6e9c0f4d /compiler/jni/quick/calling_convention.h | |
parent | 53296a7ed4ccf1cccfb32ed9da3aae90bc8b7ff2 (diff) |
JNI: Rewrite locking for synchronized methods.
Lock and unlock in dedicated entrypoints instead of the
`JniMethodStart*()` and `JniMethodEnd*()` entrypoints.
Update x86 and x86-64 lock/unlock entrypoints to use the
same checks as arm and arm64.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 172332525
Change-Id: I82b5af211aa22479f8b0eec7f3a50bc92ec87eca
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r-- | compiler/jni/quick/calling_convention.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h index faa83daf7c..0be523362f 100644 --- a/compiler/jni/quick/calling_convention.h +++ b/compiler/jni/quick/calling_convention.h @@ -363,6 +363,10 @@ class JniCallingConvention : public CallingConvention { return !IsCriticalNative(); } + // Locking argument register, used to pass the synchronization object for calls + // to `JniLockObject()` and `JniUnlockObject()`. + virtual ManagedRegister LockingArgumentRegister() const = 0; + // Hidden argument register, used to pass the method pointer for @CriticalNative call. virtual ManagedRegister HiddenArgumentRegister() const = 0; |