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

Christian Hagedorn chagedorn at openjdk.org
Fri Aug 2 13:45:39 UTC 2024


On Thu, 1 Aug 2024 09:26:19 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> I'm not saying that `RestrictStable` should be made product. It was a deliberate decision to limit it only to trusted classes. 
>> 
>> There are existing tests for `@Stable` (under `test/hotspot/jtreg/compiler/stable/`) and they don't require any special assistance from the JVM.
>
> Again, the problem here is that new tests are *IR Tests*, and I am struggling to find a good way to bootclasspath the classes that IR Test Framework itself invokes. A develop `RestrictStable` flag is the cleanest approach I could find. The tests you referenced are not IR tests, and so do not have this problem.

IIUC, you want to somehow have `-Xbootclasspath/a:path_to_your_ir_test`. I guess that's currently not so easy to do and probably needs some IR framework support.

I've had a quick look. How about something like that (just prototyped, not fully tested): [ir_framework.patch](https://github.com/user-attachments/files/16471108/ir_framework.log)


Then you could use it like that:

        TestFramework testFramework = new TestFramework();
        testFramework
                .addFlags("...", "...")
                .bootstrapTestClasses()
                .start();


If that works for all your tests, then you could either add the IR framework changes directly to this patch or we do it in preceding RFE separately.

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

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


More information about the hotspot-dev mailing list