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

Thomas Schatzl tschatzl at openjdk.org
Fri Mar 21 09:51:18 UTC 2025


On Fri, 21 Feb 2025 03:31:11 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> Test jdk/jfr/event/compiler/TestCodeCacheFull.java fails with option `-XX:-UseCodeCacheFlushing`, because this test is incompatible with `-XX:-UseCodeCacheFlushing` when `-XX:+SegmentedCodeCache` is enable, the detail analyze has been recorded by [JDK-8350386](https://bugs.openjdk.org/browse/JDK-8350386). This PR add `-XX:+UseCodeCacheFlushing` JVM option to test header make this test run passes whenever test receive `-XX:-UseCodeCacheFlushing` from outside or not.
> 
> Change has been verified locally, test-fix only, no risk.

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?

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

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


More information about the hotspot-jfr-dev mailing list