RFR: 8337876: [IR Framework] Add support for IR tests with @Stable [v2]
Aleksey Shipilev
shade at openjdk.org
Tue Aug 6 13:24:37 UTC 2024
On Tue, 6 Aug 2024 13:17:06 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> It is currently not possible to write IR tests with `@Stable` annotations because one need to somehow add the IR test classes to the boot classpath. This patch provides support to write such IR tests. I've added a section to the README to provide guidance on how this can be done.
>>
>> This is motivated by https://github.com/openjdk/jdk/pull/19635.
>>
>> I've tested this patch by taking the current patch of https://github.com/openjdk/jdk/pull/19635, dropping the `RestrictStable` flag and modifying the tests to work with the new IR framework feature:
>>
>> TestFramework testFramework = new TestFramework();
>> testFramework
>> .addFlags("-XX:-TieredCompilation",
>> "-XX:+UseParallelGC")
>> .addTestClassesToBootClassPath()
>> .start();
>>
>>
>> Thanks,
>> Christian
>
> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>
> Review by Aleksey
Looks fine, except one nit. I think we should maybe do a simple test to confirm this works on both Linux and Windows?
test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMProcess.java line 102:
> 100: if (testClassesOnBootClassPath) {
> 101: // Add test classes themselves to boot classpath to make them privileged.
> 102: bootClassPath += ":" + Utils.TEST_CLASSES;
I think `:` is not portable, and should instead be `File.pathSeparator`?
-------------
PR Review: https://git.openjdk.org/jdk/pull/20477#pullrequestreview-2221294603
PR Review Comment: https://git.openjdk.org/jdk/pull/20477#discussion_r1705529991
More information about the hotspot-compiler-dev
mailing list