RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2]

Anton Rybochkin duke at openjdk.org
Fri Jun 6 16:01:46 UTC 2025


On Fri, 6 Jun 2025 15:30:15 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> There are test failures in GHA right now, do you know what are those?
> 
> ```
> [INFO] Running org.openjdk.jol.vm.HotspotUnsafeTest
> Error:  Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 s <<< FAILURE! - in org.openjdk.jol.vm.HotspotUnsafeTest
> Error:  org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment  Time elapsed: 0.012 s  <<< FAILURE!
> java.lang.AssertionError: expected:<8> but was:<65536>
> 	at org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment(HotspotUnsafeTest.java:14)
> ```

Yes, they illustrate incorrect object alignment calculation in generational ZGC

> jol-core/pom.xml line 363:
> 
>> 361:             <id>generational-zgc-tests</id>
>> 362:             <activation>
>> 363:                 <jdk>21</jdk>
> 
> Sounds more like `[21,)`?

Java 24+ doesn't have -XX:+ZGenerational flag and has non-generational mode removed. This profile forces usage of generational ZGC in current LTS version, the other profile enables default ZGC available.

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

PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949731109
PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132451223


More information about the jol-dev mailing list