RFR: 8337876: [IR Framework] Add support for IR tests with @Stable [v2]

Christian Hagedorn chagedorn at openjdk.org
Tue Aug 6 13:17:06 UTC 2024


On Tue, 6 Aug 2024 12:10:42 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review by Aleksey
>
> test/hotspot/jtreg/compiler/lib/ir_framework/README.md line 161:
> 
>> 159: 
>> 160: ### 2.5 IR Tests with `@Stable` annotation
>> 161: To run tests with `@Stable` annotations, one need to add the test classes to the boot classpath. This can easily be achieved by calling `TestFramework.addTestClassesToBootClassPath()` on the test framework object:
> 
> I think mentioning `@Stable` here is overly specific. This guidance applies to any code that expects to be run in privileged mode, whether it is `@Stable`, `@Contended`, `@ReservedStackAccess`, etc. I say it should be e.g. "2.5 IR Tests With Privileged Classes" or some such.

Thanks for the quick review! You're right, that's too specific. I've pushed an update according to your suggestion.

> test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMProcess.java line 107:
> 
>> 105:         cmds.add("-XX:+WhiteBoxAPI");
>> 106:         // Ignore CompileThreshold and CompileCommand flags which have an impact on the profiling information.
>> 107:         List<String> jtregVMFlags = Arrays.stream(Utils.getTestJavaOpts()).filter(s -> !s.contains("CompileThreshold")).toList();
> 
> This hunk seems unnecessary? I would like to have IR Framework patch that is easily backportable and does not contain additional, non-essential hunks :)

Fair point, could be done separately, dropped :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20477#discussion_r1705515066
PR Review Comment: https://git.openjdk.org/jdk/pull/20477#discussion_r1705514947


More information about the hotspot-compiler-dev mailing list