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

2021-09-08 Thread Vladimir Ivanov
On Thu, 2 Sep 2021 11:45:01 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 `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
>
> Vladimir Ivanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update the comment

Thanks for the reviews, Mandy, Paul, and David.

-

PR: https://git.openjdk.java.net/jdk/pull/5258


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

2021-09-02 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, 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

Vladimir Ivanov has updated the pull request incrementally with one additional 
commit since the last revision:

  Update the comment

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5258/files
  - new: https://git.openjdk.java.net/jdk/pull/5258/files/64f2de83..09c36317

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=5258=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5258=01-02

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5258.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5258/head:pull/5258

PR: https://git.openjdk.java.net/jdk/pull/5258