Skip to content

8374147: [lworld] Cleanup markword bit masks and constants#2238

Open
caspernorrbin wants to merge 1 commit intoopenjdk:lworldfrom
caspernorrbin:markword-bits-move-rename
Open

8374147: [lworld] Cleanup markword bit masks and constants#2238
caspernorrbin wants to merge 1 commit intoopenjdk:lworldfrom
caspernorrbin:markword-bits-move-rename

Conversation

@caspernorrbin
Copy link
Member

@caspernorrbin caspernorrbin commented Mar 17, 2026

Hi everyone,

The current naming of the Valhalla-related markWord definitions is a bit confusing and does not really match the mainline naming scheme. In particular, the new *_mask_in_place constants are not just the corresponding *_mask shifted into place. They are instead used as classification masks, so they also include either lock bits or other Valhalla bits.

In this change I tried to make the structure and naming more regular, closer to the pattern we already use in mainline, and also closer to how the non-Valhalla bits are laid out here.

I split the definitions into a clearer flow:

  • Added *_mask for all Valhalla fields.
  • Kept *_mask_in_place for the Valhalla fields, but as the shifted version of each corresponding mask.
  • Added new *_pattern_mask constants for the composite masks, to make it clearer that these represent more than a single field mask. This also matches the existing *_pattern naming better.

As part of this, I updated all uses to the new names that match the intended naming. Overall, this gives the markWord bit definitions a more consistent and easier to follow structure.

Testing:

  • Tiers 1-3

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-8374147: [lworld] Cleanup markword bit masks and constants (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2238

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 17, 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

openjdk bot commented Mar 17, 2026

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 17, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 17, 2026

Webrevs

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

Labels

rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant