Skip to content

8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH#2295

Closed
caspernorrbin wants to merge 6 commits intoopenjdk:lworldfrom
caspernorrbin:inlinetypedensitytest-coh-fix
Closed

8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH#2295
caspernorrbin wants to merge 6 commits intoopenjdk:lworldfrom
caspernorrbin:inlinetypedensitytest-coh-fix

Conversation

@caspernorrbin
Copy link
Copy Markdown
Member

@caspernorrbin caspernorrbin commented Apr 2, 2026

Hi everyone,

The test InlineTypeDensity.java builds on incorrect assumptions that a null restricted non-atomic value class is identical to a primitive type, which is not necessarily the case. For example, the first element of an array has to be aligned to 64 bits, while in a primitive type it does not. With COH enabled, this causes the test to fail, as the value class becomes bigger than its primitive equivalent.

I have reworked this test to instead check that everything is flattened as expected, and that the alignment of the first element is correctly 64 bits. With these changes, I have also removed vm.flagless which makes us able to run this test in more configurations.

Testing:

  • Tiers 1-3
  • Manual runs of the test with different flag combinations.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2295/head:pull/2295
$ git checkout pull/2295

Update a local copy of the PR:
$ git checkout pull/2295
$ git pull https://git.openjdk.org/valhalla.git pull/2295/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2295

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2295.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 2, 2026

👋 Welcome back cnorrbin! A progress list of the required criteria for merging this PR into lworld 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
Copy Markdown

openjdk bot commented Apr 2, 2026

@caspernorrbin This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH

Reviewed-by: stefank, fparain

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 139 new commits pushed to the lworld branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@stefank, @fparain) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title 8379614 8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH Apr 2, 2026
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 2, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 2, 2026

Webrevs

Copy link
Copy Markdown
Member

@stefank stefank 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 to me. The test functions could stay non-public, I think.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@fparain fparain left a comment

Choose a reason for hiding this comment

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

LGTM.
Thank you for fixing this test.

@caspernorrbin
Copy link
Copy Markdown
Member Author

/template append

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

@caspernorrbin The pull request template has been appended to the pull request body

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 14, 2026
@caspernorrbin
Copy link
Copy Markdown
Member Author

Thank you both for reviewing

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 14, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

@caspernorrbin
Your change (at version ace6c15) is now ready to be sponsored by a Committer.

@fparain
Copy link
Copy Markdown
Collaborator

fparain commented Apr 14, 2026

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

Going to push as commit c8bdf17.
Since your change was applied there have been 139 commits pushed to the lworld branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 14, 2026
@openjdk openjdk bot closed this Apr 14, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Apr 14, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

@fparain @caspernorrbin Pushed as commit c8bdf17.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants