RFR: 8285984: G1: Use standard idiom for inlined payload in G1MonotonicArena::Segment [v3]

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Sep 22 13:39:53 UTC 2025


On Thu, 18 Sep 2025 13:54:17 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> This change remove the old padding (extremely big, especially on x86-64), and replaces it with a guaranteed 8 byte alignment. It also removes the `_bottom` field and instead adds a `payload` method. I statically assert that Segment is 8 byte aligned. I then runtime assert that Segment is constructed on 8 byte aligned memory. I also assert that the Slot alignment is less than or equal to the Segment alignment.
>> 
>> I am running tier 1-3 at the moment. Do you think I should run some specific performance test on this?
>
> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Cleanup after comments from Axel.
>   
>   Rename  SegmentAlignment -> SegmentPayloadMaxAlignment.
>   
>   Transform alignment assert to use percent operator (will ensure slot
>   alignment is both less than segment alignment AND that segment
>   alignment is a multiple of slot alignment)

Marked as reviewed by aboldtch (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/27258#pullrequestreview-3252847127


More information about the hotspot-gc-dev mailing list