Skip to content

Conversation

@cost0much
Copy link
Contributor

@cost0much cost0much commented Nov 28, 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 ran on internal Amazon pipeline and passes jtreg tier1-4 on platforms linux x64, aarch64, aarch32; windows x64; macos x64, aarch64. Passes GHA. Backport not clean due to JDK-8330694 renaming HeapRegion to G1HeapRegion; modifications to the change are minimal as only had to "un-rename" the refactor.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8354145 needs maintainer approval

Issue

  • JDK-8354145: G1: UseCompressedOops boundary is calculated on maximum heap region size instead of maxiumum ergonomic heap region size (Bug - P4 - Requested)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2497/head:pull/2497
$ git checkout pull/2497

Update a local copy of the PR:
$ git checkout pull/2497
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2497/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2497

View PR using the GUI difftool:
$ git pr show -t 2497

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2497.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 28, 2025

👋 Welcome back cost0much! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 28, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 526951dba731f0e733e22a3bff7ac7a18ce9dece 8354145: G1: UseCompressedOops boundary is calculated on maximum heap region size instead of maxiumum ergonomic heap region size Nov 28, 2025
@openjdk
Copy link

openjdk bot commented Nov 28, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Nov 28, 2025
@cost0much cost0much marked this pull request as ready for review November 28, 2025 21:57
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 28, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 28, 2025

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other testing have you done? We usually like to see at least jdk tier1, and tier2 if possible.

@cost0much
Copy link
Contributor Author

@phohensee Thanks for calling that out. I've updated the description, and since ran tests on internal pipelines confirming no regressions jtreg tier 1-4 for our supported platforms.

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@openjdk
Copy link

openjdk bot commented Dec 2, 2025

⚠️ @cost0much This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@cost0much
Copy link
Contributor Author

/approval request 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. Regarding only LTS versions, this creates a gap in expected behavior as 8-17 and 25 all share the same ergonomics, with only 21 being different; this greatly inconveniences users upgrading/migrating JDK versions.

Does not apply cleanly due to JDK-8330694 but conflicts are trivial. Patched in JDK25 and no bugtail. Passes jtreg tier1-4 on multiple platforms; see PR for list. New test passes with change, fails without; GHA also passes. Risk is medium because hotspot change that affects G1.

@openjdk
Copy link

openjdk bot commented Dec 2, 2025

@cost0much
8354145: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants