-
Notifications
You must be signed in to change notification settings - Fork 143
8370509: [lworld] EnableValhalla is not needed for sync #1699
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 coleenp! A progress list of the required criteria for merging this PR into |
|
@coleenp 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: 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 204 new commits pushed to the
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 |
Webrevs
|
| andr(mark, mark, ~((int) markWord::inline_type_bit_in_place)); | ||
| } | ||
| // Mask inline_type bit such that we go to the slow path if object is an inline type | ||
| andr(mark, mark, ~((int) markWord::inline_type_bit_in_place)); |
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.
Since EnableValhalla=true by default, we were already exercising this path by default.
Can we get into a situation where we do not use the object monitor table and the markword is inflated while we perform this check? We would get in trouble with this bit check if we can.
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.
The code fetches the markWord, and tests for monitor value where an ObjectMonitor* may be installed. It doesn't refetch the markWord from the object so that if a concurrent thread changes it, it'll always go slow path already. Both platforms test the bit on a copy of the markWord after it's been fetched from the object and then checked for monitor_value.
I've sort of always wondered why it's not checked at DiagnoseSyncOnValueBasedClasses but that has a load_klass which is more instructions. This code can check the bit in the markWord instead.
| ShouldNotReachHere(); | ||
| } | ||
| // VM should be calling bootstrap method | ||
| assert(!obj->klass()->is_inline_klass(), "should not reach here"); |
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.
Nitpick: more descriptive message.
|
Thanks Paul and Fred for reviewing. |
|
Going to push as commit ba1a305.
Your commit was automatically rebased without conflicts. |
I took out EnableValhalla as a conditional test in the ObjectSynchronizer code. If the inline type bit is set in the markWord or the klass is InlineKlass, we can't synchronize on the object.
I added a test but it was sort of a duplicate of all runtime/valhalla/inlinetypes/MonitorEnterTest.java and duplicates all tests that do locking so I didn't add a test.
Testing with tier1-4, still in progress.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1699/head:pull/1699$ git checkout pull/1699Update a local copy of the PR:
$ git checkout pull/1699$ git pull https://git.openjdk.org/valhalla.git pull/1699/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1699View PR using the GUI difftool:
$ git pr show -t 1699Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1699.diff
Using Webrev
Link to Webrev Comment