-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8332610: Remove unused nWakeups in ObjectMonitor #19326
Conversation
👋 Welcome back jsjolen! A progress list of the required criteria for merging this PR into |
@jdksjolen 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 29 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 |
@jdksjolen The following label 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 list. If you would like to change these labels, use the /label pull request command. |
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.
Please remove that unused variable also in the two places it's defined. There's a perf counter that does not use this variable so the comment above with TryLock does make sense wrt to that perf counter. This local variable is unused.
|
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.
Looks great! Thank you for finding this unused code.
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.
Thumbs up. This is a trivial fix.
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.
Interestingly this code has been dead since it was introduced. I will assume it was leftover debugging/performance-monitoring code.
// Keep a tally of the # of futile wakeups. | ||
// Note that the counter is not protected by a lock or updated by atomics. | ||
// That is by design - we trade "lossy" counters which are exposed to | ||
// races during updates for a lower probe effect. |
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 same comment block needs deleting at line 874 too.
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.
Actually, I think the comment blocks are referring to the OM_PERFDATA_OP(FutileWakeups, inc());
calls not the nWakeups
local variable.
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.
Please restore comment, and possibly move them closer to the code the relate to.
Also nit: please change the bug synopsis to "Remove unused nWakeups in ObjectMonitor"
Thanks
Good catch on both! I've fixed the issues, thanks. |
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.
I would not have missed that comment, but it looks fine.
Errors for maxos-x64 unrelated to this patch. Thanks Coleen, Dan and David. /integrate |
Going to push as commit 9ca90cc.
Your commit was automatically rebased without conflicts. |
@jdksjolen Pushed as commit 9ca90cc. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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.
I'm fine with the final version also.
Hi,
This comment only serves to confuse people, as
nWakeups
is not shared between threads and never read. It is probably meant for debugging (not sure). Let's delete the comment.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19326/head:pull/19326
$ git checkout pull/19326
Update a local copy of the PR:
$ git checkout pull/19326
$ git pull https://git.openjdk.org/jdk.git pull/19326/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19326
View PR using the GUI difftool:
$ git pr show -t 19326
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19326.diff
Webrev
Link to Webrev Comment