RFR: 8355228: Improve runtime/CompressedOops/CompressedClassPointersEncodingScheme.java to support JDK build with -XX:+UseCompactObjectHeaders

Coleen Phillimore coleenp at openjdk.org
Wed Apr 23 11:39:40 UTC 2025


On Mon, 21 Apr 2025 21:18:34 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> Sometimes it is easier to test JDK by building it with
>  -XX:+UseCompactObjectHeaders
> enabled by default. So CDS archives are generated and all tests including flagless are executed.
> The option is transparent fand all tests even flagless tests are expected to  pass.
> 
> The only test runtime/CompressedOops/CompressedClassPointersEncodingScheme.java
> start failing because expects to be executed with -XX:-UseCompactObjectHeaders
> 
> Please, note that it is a not a bug, just RFE. Test works  correctly.   
> 
> The fix improves test  to support testing of JDK build with -XX:+UseCompactObjectHeaders.
> 
> Tested with JDK build with UseCompactObjectHeaders enabled by default.

This looks good.  When we make UseCompactObjectHeaders a product option, the UnlockExperimentalVMOptions won't be needed anymore but I think we could keep it in this test anyway and not change this test to remove the UnlockExperimentalVMOptions.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24781#pullrequestreview-2786980893


More information about the hotspot-runtime-dev mailing list