diff options
author | 2021-11-17 13:16:35 +0000 | |
---|---|---|
committer | 2021-11-22 15:28:02 +0000 | |
commit | c17656bcf477e57d59ff051037c96994fd0ac8f2 (patch) | |
tree | 78704cdca54c7437a34c9ca4b9da27ed6e9c0f4d /runtime/entrypoints/entrypoint_utils.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 'runtime/entrypoints/entrypoint_utils.h')
-rw-r--r-- | runtime/entrypoints/entrypoint_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index 72b4c030f8..4731a867d2 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -217,7 +217,7 @@ bool NeedsClinitCheckBeforeCall(ArtMethod* method) REQUIRES_SHARED(Locks::mutato // Returns the synchronization object for a native method for a GenericJni frame // we have just created or are about to exit. The synchronization object is // the class object for static methods and the `this` object otherwise. -jobject GetGenericJniSynchronizationObject(Thread* self, ArtMethod* called) +ObjPtr<mirror::Object> GetGenericJniSynchronizationObject(Thread* self, ArtMethod* called) REQUIRES_SHARED(Locks::mutator_lock_); // Update .bss method entrypoint if the `callee_reference` has an associated oat file |