RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v5]

Aleksey Shipilev shade at openjdk.org
Fri Jun 6 17:16:04 UTC 2025


On Fri, 6 Jun 2025 16:51:43 GMT, Anton Rybochkin <duke at openjdk.org> wrote:

>> Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly
>
> Anton Rybochkin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision:
> 
>  - Variable name fixed
>  - Fixed default alignment on 32-bit platforms

Looking good. We need to touch up a few things. I think it is also okay not to handle non-generational ZGC, if you don't want to deal with it.

jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java line 1:

> 1: package org.openjdk.jol.vm;

Still surprised there is no automatic license header here. Run `mvn clean verify` locally? Maybe we don't cover all the paths, see if tests also need these headers.

jol-core/src/test/java/org/openjdk/jol/vm/ZGCAddressTest.java line 35:

> 33:         }
> 34:     }
> 35: }

Add a newline here.

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

PR Review: https://git.openjdk.org/jol/pull/65#pullrequestreview-2905549200
PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132568577
PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132568965


More information about the jol-dev mailing list