Skip to content

Conversation

fbredber
Copy link
Contributor

@fbredber fbredber commented Sep 2, 2025

Since the integration of JDK-8359437 the LockingMode flag can no longer be set by the user. After that, a number of PRs has been integrated which has removed all LockingMode related code from all platforms (except from zero, which is done in this PR).

This PR removes LockingMode related code from the shared (non-platform specific) files. It also removes the LockingMode variable itself.

Passes tier1-tier7 with no added problems.


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

Issue

  • JDK-8365190: Remove LockingMode related code from share (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27041

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27041.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2025

👋 Welcome back fbredberg! 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 Sep 2, 2025

@fbredber 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:

8365190: Remove LockingMode related code from share

Reviewed-by: aboldtch, dholmes, ayang, coleenp, lmesnik, rcastanedalo

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 96 new commits pushed to the master 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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Sep 2, 2025

@fbredber The following labels will be automatically applied to this pull request:

  • graal
  • hotspot
  • serviceability
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Sep 2, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 2, 2025
Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

A few comments and suggestions for your next RFE.

Copy link
Member

@xmas92 xmas92 left a comment

Choose a reason for hiding this comment

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

Nothing obvious seems to be missing from the removal. And the changes look correct.

As @coleenp already mentioned there is even more code now that is effectively unused. Mostly to do with legacy + loom interactions. But I think it is fine to remove that in a follow up RFE.

Similarly there are some nomenclature that should be updated, but I know you have expressed wanting to do that in a follow up RFE as well.

I think it the main refactoring that are left are cleaning up the Synchronizer APIs, unifying some functions etc.

As for unifying LightweightSynchronizer with the ObjectSynchronizer, there might be an opportunity to let ObjectSynchronizer define the general API used by the rest of the VM to interact with the locking subsystem. And let LightweightSynchronizer contain all of the implementation. This could including moving the locking specific implementation details of relocking, deopting etc. behind an interface, decoupling them, and avoiding leaking implementation.

Copy link
Member

@lmesnik lmesnik left a comment

Choose a reason for hiding this comment

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

svc part looks good.

Copy link
Member

@dholmes-ora dholmes-ora 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. Great cleanup! A couple of nits/suggestions.

Thanks

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 4, 2025
Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

Looks great!!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 4, 2025
Copy link
Contributor

@robcasloz robcasloz left a comment

Choose a reason for hiding this comment

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

Compiler changes look good, thanks!

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 8, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 8, 2025
@fbredber
Copy link
Contributor Author

fbredber commented Sep 8, 2025

Thank you all for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 8, 2025

Going to push as commit a272696.
Since your change was applied there have been 98 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 8, 2025
@openjdk openjdk bot closed this Sep 8, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 8, 2025
@openjdk
Copy link

openjdk bot commented Sep 8, 2025

@fbredber Pushed as commit a272696.

💡 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
Development

Successfully merging this pull request may close these issues.

7 participants