Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-02 Thread Vladimir Ivanov
On Thu, 2 Sep 2021 05:08:38 GMT, David Holmes wrote: >> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1152: >> >>> 1150: * The call returns when either class {@code c} is fully >>> initialized or >>> 1151: * class {@code c} is being initialized and the call is

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread David Holmes
On Wed, 1 Sep 2021 18:28:30 GMT, Paul Sandoz wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve comments > > src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1152: > >> 1150: * The call

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Paul Sandoz
On Wed, 1 Sep 2021 16:16:38 GMT, Vladimir Ivanov wrote: >> Get rid of WeakReference-based logic in >> DirectMethodHandle::checkInitialized() and reimplement it with >> `Unsafe::ensureClassInitialized()`/`shouldBeInitialized()`. >> >> The key observation is that

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
On Thu, 26 Aug 2021 23:49:07 GMT, David Holmes wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve comments > > src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 385: > >> 383:

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
On Tue, 31 Aug 2021 16:36:58 GMT, Mandy Chung wrote: > May i suggest that we add some JavaDoc to ensureClassInitialized Thanks, Paul. How does the latest version look? - PR: https://git.openjdk.java.net/jdk/pull/5258

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
> 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,