-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id #22524
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 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 74 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 |
|
@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. |
Webrevs
|
coleenp
left a comment
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.
Renaming looks good and makes it clearer what the id is.
dholmes-ora
left a comment
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.
Thanks for making the changes.
One minor nit, but looks good.
| void set_monitor_owner_id(int64_t val) { | ||
| assert(val >= ThreadIdentifier::initial() && val < ThreadIdentifier::current(), ""); | ||
| _monitor_owner_id = val; |
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.
Nit: Using id rather than val would be more consistent with other changes (ObjectMonitor::owner_id_from)
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.
| if (p->is_vthread_mounted()) { | ||
| // _lock_id is the thread ID of the mounted virtual thread | ||
| st->print_cr(" Mounted virtual thread #" INT64_FORMAT, p->lock_id()); | ||
| st->print_cr(" Mounted virtual thread #" INT64_FORMAT, java_lang_Thread::thread_id(p->vthread())); |
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.
Was initially unsure why p->lock_id() didn't change to p->monitor_owner_id(), but here you want the thread-id not something that happens to match the thread-id.
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.
Exactly.
coleenp
left a comment
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.
Update looks good!
|
Thanks for the reviews Coleen and David! |
|
/integrate |
|
Going to push as commit c113f82.
Your commit was automatically rebased without conflicts. |
…ds without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…ds without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…ds without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
…without Pinning Fixes: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Fixes: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Follow-up: 78b8015 ("8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning") Follow-up: c113f82 ("8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id") Link: openjdk#21565 Link: openjdk#22524 Signed-off-by: Bingwu Zhang <[email protected]>
Please review this small renaming patch. During the review of JDK-8338383 there were some comments about improving the naming for
ObjectMonitor::owner_from()andJavaThread::_lock_id. These originate from the changes introduced to inflated monitors, where we now record thejava.lang.Thread.tidof the owner in the ObjectMonitor's_ownerfield instead of aJavaThread*. I renamed_lock_idas_monitor_owner_idandowner_from()asowner_id_from().Thanks,
Patricio
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22524/head:pull/22524$ git checkout pull/22524Update a local copy of the PR:
$ git checkout pull/22524$ git pull https://git.openjdk.org/jdk.git pull/22524/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22524View PR using the GUI difftool:
$ git pr show -t 22524Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22524.diff
Using Webrev
Link to Webrev Comment