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

Leo Korinth lkorinth at openjdk.org
Fri Sep 12 13:37:36 UTC 2025


> 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:

  may fail on 32 bit machines, added explicit alignas

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27258/files
  - new: https://git.openjdk.org/jdk/pull/27258/files/766577e6..131fa911

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27258&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27258&range=00-01

  Stats: 8 lines in 3 files changed: 1 ins; 1 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/27258.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27258/head:pull/27258

PR: https://git.openjdk.org/jdk/pull/27258


More information about the hotspot-gc-dev mailing list