RFR: 8350386: Test TestCodeCacheFull.java fails with option -XX:-UseCodeCacheFlushing [v2]

SendaoYan syan at openjdk.org
Sat Mar 22 04:03:18 UTC 2025


On Fri, 21 Mar 2025 09:48:50 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use "* @requires vm.opt.UseCodeCacheFlushing == null | vm.opt.UseCodeCacheFlushing == true" instead of enable UseCodeCacheFlushing in options
>
> test/jdk/jdk/jfr/event/compiler/TestCodeCacheFull.java line 48:
> 
>> 46:  * @run main/othervm -Xbootclasspath/a:.
>> 47:  *     -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
>> 48:  *     -XX:+UseCodeCacheFlushing
> 
> That is one option, what about having a
> 
> * @requires vm.opt.UseCodeCacheFlushing == null | vm.opt.UseCodeCacheFlushing == true
> 
> or
> 
>   * @requires @requires vm.opt.final.UseCodeCacheFlushing [== true]
> 
> 
> instead to only run the test if the flag in question is not set or true, or the final value is true?

Thanks, use `@requires` to check the flag is not set or true, is more elegant and more clear.

The PR has been updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23721#discussion_r2008643120


More information about the hotspot-jfr-dev mailing list