-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8256425: Obsolete Biased Locking in JDK 18 #4522
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
Conversation
👋 Welcome back pchilanomate! A progress list of the required criteria for merging this PR into |
@pchilano The following labels will be automatically applied to this pull request:
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. |
/label remove build,core-libs, shenandoah,serviceability |
@pchilano The The The |
@pchilano The |
@pchilano |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice clean up. Thank you. I have small nitpick and question about BiasedLocking flags deprecation. Obsolete flags table says: { "UseBiasedLocking", JDK_Version::jdk(15), JDK_Version::jdk(18), JDK_Version::jdk(19) },
It means in JDK 18 JVM have to accept flags on command line but issue warning.
May be I mistaking, but it means you can not remove flags declaration.
You can remove corresponding code.
@@ -379,10 +379,6 @@ void VM_Version::initialize() { | |||
// Adjust RTM (Restricted Transactional Memory) flags. | |||
if (UseRTMLocking) { | |||
// If CPU or OS do not support TM: | |||
// Can't continue because UseRTMLocking affects UseBiasedLocking flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix in previous line TM
-> RTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Mailing list message from David Holmes on hotspot-runtime-dev: On 18/06/2021 11:56 am, Vladimir Kozlov wrote:
Correct.
You can remove the flag (and must). Obsolete flags are handled purely by Cheers, |
1 similar comment
Mailing list message from David Holmes on hotspot-runtime-dev: On 18/06/2021 11:56 am, Vladimir Kozlov wrote:
Correct.
You can remove the flag (and must). Obsolete flags are handled purely by Cheers, |
Tests look fine. Also on s390. Unfortunately on ppc64le the tests didn't succeed because of another change. I'd suggest to wait one more day if you don't mind. Richard. |
Hi Richard,
No problem, let me know when tests complete successfully. Thanks again! Patricio |
Hi Patricio, ppc64le test results are available now. There's no failure related to this change. Thanks for your patience, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Patricio,
as stated before I've reviewed the part of this change that is related to JDK-8227745 and found it to be good.
Good thing to get rid of so much complex code!
Thanks, Richard.
@pchilano this pull request can not be integrated into git checkout 8256425
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Great, thanks for reviewing and all the testing Richard! Patricio |
Thanks all for reviews and comments! |
/integrate |
Going to push as commit 2fd7943.
Your commit was automatically rebased without conflicts. |
This change caused a performance regression for GraalVM in that it effectively disabled the intrinsic for @vnkozlov I know you've been pretty good at alerting us to such PRs but I wonder if there's a more automated way to achieve this? |
We have a mapping between directories and mailing lists that should be notified when changes are done to files in those directories. See: Here you can see that the hotspot-compiler mailing list gets notified if changes are made to |
Thanks - I've opened https://bugs.openjdk.org/browse/SKARA-1905. |
Hi all,
Please review the following patch which handles the removal of biased locking code.
The third least significant bit of the markword is now always unused. I didn't try to give it back to the age field as it was prior to biased locking introduction since it will likely be taken away by other projects (probably Valhalla).
Regarding c1 changes, the scratch register passed to LIRGenerator::monitor_enter() was only used by biased locking code except in ppc, so in all other platforms I removed the scratch parameter from C1_MacroAssembler::lock_object() (except in s390 where it wasn't defined already).
We could probably just always use R0 as a temp register in lock_object() for ppc, since we were already using it as temp in biased_locking_enter(), and remove the scratch parameter from there too. Then we could remove the scratch field from LIR_OpLock. I haven't done that in this patch though.
For c2, type.hpp defined XorXNode, StoreXConditionalNode, LoadXNode and StoreXNode as needed by UseOptoBiasInlining. I see that LoadXNode and StoreXNode are also used by shenandoahSupport so I kept those two defines. I removed only the biased locking comments from the storeIConditional/storeLConditional implementations in .ad files since I don't know if they might be needed.
There are some tests that were only meaningful when run with biased locking enabled so I removed them.
Tested in mach5 tiers 1-7. I tested it builds also on ppc, s390 and arm32 but can't run any tests on those platforms so it would be good if somebody can do some sanity check on those ones.
Thanks,
Patricio
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4522/head:pull/4522
$ git checkout pull/4522
Update a local copy of the PR:
$ git checkout pull/4522
$ git pull https://git.openjdk.java.net/jdk pull/4522/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4522
View PR using the GUI difftool:
$ git pr show -t 4522
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4522.diff