Integrated: 8273000: Remove WeakReference-based class initialisation barrier implementation
Vladimir Ivanov
vlivanov at openjdk.java.net
Wed Sep 8 11:32:12 UTC 2021
On Wed, 25 Aug 2021 22:05:24 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Get rid of WeakReference-based logic in DirectMethodHandle::checkInitialized() and reimplement it with `Unsafe::ensureClassInitialized()`/`shouldBeInitialized()`.
>
> The key observation is that `Unsafe::ensureClassInitialized()` does not block the initializing thread.
>
> Also, removed `Unsafe::shouldBeInitialized()` in `DMH::shouldBeInitialized(MemberName)` to save on calling into the VM.
> `Unsafe::ensureClassInitialized()` already has a fast-path check which checks whether the class is fully initialized or not.
>
> Testing: tier1 - tier6
This pull request has now been integrated.
Changeset: faa942c8
Author: Vladimir Ivanov <vlivanov at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/faa942c8ba8ad778b6be20ff6d98a5040a9079e9
Stats: 43 lines in 2 files changed: 5 ins; 28 del; 10 mod
8273000: Remove WeakReference-based class initialisation barrier implementation
Reviewed-by: psandoz, mchung
-------------
PR: https://git.openjdk.java.net/jdk/pull/5258
More information about the core-libs-dev
mailing list