On Wed, 10 Nov 2021 17:16:29 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
> JNI Local handles can only be created by JavaThread (there's an assert in > make_local) but the fields are added to Thread. > Move the fields to JavaThread and adding JavaThread* argument. > Also, the global freelist isn't very useful now that global JNI handles don't > use JNIHandleBlock, so the locking that claims incorrectly to block for > safepoint is removed. > Lastly, there's at least 3 places that duplicate pushing a new JNIHandleBlock > to the thread for temporarily adding JNI local handles. These have been moved > to common code with a JNIHandleMark object, moved from jvmci code. > The commits are separate to help reviewing, but the entire change has been > tested together with tier1-6. > The commits in this change have been performance tested individually and > together with no meaningful differences from mainline. This pull request has now been integrated. Changeset: 3b2585c0 Author: Coleen Phillimore <cole...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/3b2585c02bd9d66cc2c8b2d5c16e9a48f4280d07 Stats: 425 lines in 25 files changed: 75 ins; 302 del; 48 mod 8276658: Clean up JNI local handles code Reviewed-by: dholmes, pchilanomate ------------- PR: https://git.openjdk.java.net/jdk/pull/6336