[jdk21u-dev] RFR: 8354145: G1: UseCompressedOops boundary is calculated on maximum heap region size instead of maxiumum ergonomic heap region size

Daniel Hu duke at openjdk.org
Fri Nov 28 22:01:28 UTC 2025


Fixes UseCompressedOops ergonomics to use original limits for G1 GC; prior to JDK18, `-Xmx32736m` by default enables UseCompressedOops but in JDK21 `-Xmx32736m` default sets UseCompressedOops to false. New test passes with change, fails without. Change passes GHA. Backport not clean due to [JDK-8330694](https://bugs.openjdk.org/browse/JDK-8330694) renaming `HeapRegion` to `G1HeapRegion`; modifications to the change are minimal as only had to "un-rename" the refactor.

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

Commit messages:
 - Backport 526951dba731f0e733e22a3bff7ac7a18ce9dece

Changes: https://git.openjdk.org/jdk21u-dev/pull/2497/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2497&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8354145
  Stats: 94 lines in 4 files changed: 94 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/2497.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2497/head:pull/2497

PR: https://git.openjdk.org/jdk21u-dev/pull/2497


More information about the jdk-updates-dev mailing list