Skip to content

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

Open
caspernorrbin wants to merge 5 commits intoopenjdk:lworldfrom
caspernorrbin:inlinetypedensitytest-coh-fix
Open

8379614: [lworld] runtime/valhalla/inlinetypes/InlineTypeDensity.java fails with UCOH#2295
caspernorrbin wants to merge 5 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 3 new commits pushed to the lworld branch:

  • 788bb28: 8380084: [lworld] Implement value classes in test code using annotation
  • a0236ac: 8381406: [lworld] Reduce usage of array mark word tricks for C++ code
  • 897f6db: 8379148: [lworld] Wrapper class caches should not be used when --enable-preview

Please see this link for an up-to-date comparison between the source branch of this pull request and 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.

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

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants