Skip to content

First try of removing LockingMode #25660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fbredber
Copy link
Contributor

@fbredber fbredber commented Jun 5, 2025

This is a draft PR that contains my first try of removing the LockingMode option, and fix the tests that would otherwise break when removing that option.

This means that in this first try I'll keep the LockingMode variable, but it will not be settable from the command line, all the C1 and C2 code related to legacy locking will still be in place (but as dead code) and removed later. I'm doing it this way just to get my head around what needs to be done up front to remove the LockingMode option from a user perspective.
Lightweight locking is the default locking, but the -XX:LockingMode=0, which is monitor locking, can now be set by using -XX:+UseHeavyMonitors. This system made it much easier to go through and fix all the test.

This draft PR covers parts of these JBS enhansments:

  • JDK-8344261 Obsolete the LockingMode flag and related code
  • JDK-8336325 Add back UseHeavyMonitors as a develop option

It's probably a good idea to break up this PR into several sub tasks that fall into the above enhancements.

This draft PR is mostly here as a basis for having a discussion on how to move forward.


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

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25660

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 5, 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 Jun 5, 2025

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

@openjdk
Copy link

openjdk bot commented Jun 5, 2025

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

  • core-libs
  • hotspot
  • serviceability

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.

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.

1 participant