RFR: 8333791: Fix memory barriers for @Stable fields [v2]

Aleksey Shipilev shade at openjdk.org
Wed Jul 31 18:58:36 UTC 2024


On Wed, 31 Jul 2024 18:49:47 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - Merge branch 'master' into JDK-8333791-stable-field-barrier
>>  - Variant 2: Only final-field like semantics for stable inits
>>  - Variant 3: Handle everything, including reads by compilers
>
> src/hotspot/share/runtime/globals.hpp line 1997:
> 
>> 1995:           "Use a terrible hash function in order to generate many collisions.") \
>> 1996:                                                                             \
>> 1997:   develop(bool, RestrictStable, true,                                       \
> 
> What's the use case for the flag? Solely for testing purposes (since it's develop)? 
> Alternatively, you could place the test classes on boot class path and enable test execution with product binaries.

Yes, to access the annotation from test, like `RestrictContended` nearby:
https://github.com/openjdk/jdk/blob/97f7c03dd0ff389abefed7ea2a7257bcb42e0754/src/hotspot/share/classfile/classFileParser.cpp#L1960

Not sure if putting test classes on bootclasspath would work well with IR tests that are now running in driver mode. I'd prefer to keep the develop flag and keep tests in driver mode and without additional fluff.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19635#discussion_r1698965131


More information about the hotspot-dev mailing list