RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Jun 6 16:11:43 UTC 2025
On Fri, 6 Jun 2025 16:01:44 GMT, Anton Rybochkin <duke at openjdk.org> wrote:
>> This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise)
>
> Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed default alignment on 32-bit platforms
jol-core/src/test/java/org/openjdk/jol/vm/HotspotUnsafeTest.java line 23:
> 21: return alignmentProperty
> 22: .map(alignment -> Integer.parseInt(substringAfter(alignment, "=")))
> 23: .orElse(Byte.SIZE);
`8`, not `Byte.SIZE`. It is 8-byte (64-bit) alignment. Just a coincidence it is also `8` :)
-------------
PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132469851
More information about the jol-dev
mailing list