Skip to content
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

8315880: change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT #15797

Closed
wants to merge 1 commit into from

Conversation

dcubed-ojdk
Copy link
Member

@dcubed-ojdk dcubed-ojdk commented Sep 18, 2023

Change the default of LockingMode to LM_LIGHTWEIGHT from LM_LEGACY.

This fix has been tested with 3 Mach5 Tier[1-8] runs and a 4th is in process.


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
  • Change requires CSR request JDK-8315881 to be approved

Issues

  • JDK-8315880: Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT (Enhancement - P4)
  • JDK-8315881: Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15797

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

Using diff file

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

Webrev

Link to Webrev Comment

@dcubed-ojdk
Copy link
Member Author

/label add hotspot-runtime
/label add hotspot-gc
/label add serviceability

@dcubed-ojdk dcubed-ojdk marked this pull request as ready for review September 18, 2023 20:47
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 18, 2023

👋 Welcome back dcubed! 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 openjdk bot added rfr Pull request is ready for review hotspot-runtime hotspot-runtime-dev@openjdk.org labels Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@dcubed-ojdk
The hotspot-runtime label was successfully added.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@dcubed-ojdk
The hotspot-gc label was successfully added.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@dcubed-ojdk
The serviceability label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Sep 18, 2023

Webrevs

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Sep 18, 2023
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. Thanks.

@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@dcubed-ojdk 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:

8315880: change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT

Reviewed-by: dholmes, rkennke, stefank

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 73 new commits pushed to the master branch:

  • 138542d: 8316061: Open source several Swing RootPane and Slider related tests
  • f52e500: 8316104: Open source several Swing SplitPane and RadioButton related tests
  • 3760a04: 8314021: HeapDump: Optimize segmented heap file merging phase
  • f226ceb: 8316440: LambdasInTwoArchives.java failed to find WhiteBox.class
  • 24c3d86: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests
  • 373e37b: 8313813: Field sun.util.calendar.CalendarDate#forceStandardTime is never set
  • 5308bbb: 8246280: Refine API to model sealed classes and interfaces in javax.lang.model
  • dcea9bf: 8301247: JPackage app-image exe launches multiple exe's in JDK 17+
  • 1b104b6: 8314909: tools/jpackage/windows/Win8282351Test.java fails with java.lang.AssertionError: Expected [0]. Actual [1618]:
  • 4421951: 8316142: Enable parallelism in vmTestbase/nsk/monitoring/stress/lowmem tests
  • ... and 63 more: https://git.openjdk.org/jdk/compare/ce93d27fe5725af6424573ceb29cc12f20165f69...master

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 openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Sep 19, 2023
Copy link
Contributor

@rkennke rkennke 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, thank you!

Copy link
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. Thank you!

@dcubed-ojdk
Copy link
Member Author

@dholmes-ora, @rkennke, and @stefank - Thanks for the reviews!

@dcubed-ojdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 20, 2023

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

  • 9e00949: 8316427: Duplicated code for {obj,type}ArrayKlass::array_klass
  • c43ebd3: 8315981: Opensource five more random Swing tests
  • e30e356: 8316461: Fix: make test outputs TEST SUCCESS after unsuccessful exit
  • 242eeae: 8286757: adlc tries to build with /pathmap but without /experimental:deterministic
  • b275bdd: 8308995: Update Network IO JFR events to be static mirror events
  • e1870d3: 8316411: compiler/compilercontrol/TestConflictInlineCommands.java fails intermittent with force inline by CompileCommand missing
  • ec74194: 8316546: Backout JDK-8315932: runtime/InvocationTests spend a lot of time on dependency verification
  • 2568188: 8316547: Use JUnit.dir jtreg property with jpackage JUnit tests
  • 833a828: 8315876: Open source several Swing CSS related tests
  • 7ce5bd1: 8316468: os::write incorrectly handles partial write
  • ... and 93 more: https://git.openjdk.org/jdk/compare/ce93d27fe5725af6424573ceb29cc12f20165f69...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 20, 2023

@dcubed-ojdk Pushed as commit 455cfae.

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

@dcubed-ojdk dcubed-ojdk deleted the JDK-8315880 branch September 20, 2023 19:05
@rkennke
Copy link
Contributor

rkennke commented Sep 22, 2023

BTW: would that mess with JVMCI/Graal? AFAIK, Graal does not implement support for lightweight locking, yet. Should we disable LW-locking when running with JVMCI?

@dcubed-ojdk
Copy link
Member Author

Good question.
@vnkozlov - who would be the right JVMCI/Graal person to ping?

@TheShermanTanker
Copy link
Contributor

I think this may have broken JDK-8288293 😅

Is there any compiler specific implementation involved with the new lightweight locking? Just a quick question, I can figure out the rest on my own

@rkennke
Copy link
Contributor

rkennke commented Oct 5, 2023

I think this may have broken JDK-8288293 😅

Is there any compiler specific implementation involved with the new lightweight locking? Just a quick question, I can figure out the rest on my own

Not that I am aware of. AFAIK, it works fine with various versions of GCC on Linux, Xcode on MacOS and VS on Windows.

@dcubed-ojdk
Copy link
Member Author

That would be unexpected breakage indeed...

@TheShermanTanker
Copy link
Contributor

That would be unexpected breakage indeed...

Haha, indeed. Since this was just a default flag change, it's likely the entire thing was broken on my end to begin with, just that it never manifested since I never used the lightweight mode

I think this may have broken JDK-8288293 😅
Is there any compiler specific implementation involved with the new lightweight locking? Just a quick question, I can figure out the rest on my own

Not that I am aware of. AFAIK, it works fine with various versions of GCC on Linux, Xcode on MacOS and VS on Windows.

Not with gcc on Windows, unfortunately. Looks like I have some work cut out for me. Thanks for the replies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
5 participants