-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8313081: MonitoringSupport_lock should be unconditionally initialized after 8304074 #15028
Conversation
👋 Welcome back phh! A progress list of the required criteria for merging this PR into |
@phohensee 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
|
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 good.
Thanks.
@phohensee 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 10 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
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 good.
Thanks,
Serguei
So... this does not visibly break right now, because the |
windows-aarch64 pre-submit build failure is due to an unrelated aarch64-specific issue. |
Thanks for the quick reviews! Aleksey, no, it doesn't break now because (1) we don't appear to test on non-server class machines, and (2) FLAG_SET_ERGO_IF_DEFAULT sets UseG1GC unconditionally regardless of which GC is specified on the command line because it (UseG1GC) hasn't also been specified on the command line. So, the assert would have no effect unless run on a non-server class machine. I've added the assert though. |
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 good! I reverted the mutexLocker.cpp
hunk locally, and the test fails on assert, as expected.
Thanks, Aleksey. Will push once pre-submit tests finish. |
I filed JDK-8313200 to track the windows-aarch64 build issue. But, it's a dup of JDK-8312979, so now closed. |
...and I filed JDK-8313202 to deal with |
linux-x86 langtools/tools/javac/varargs/warning/Warn4.java presubmit test failure is a crash in G1ConcurrentMark.cpp which appears unrelated. Rerun on my test box succeeded. |
/integrate |
Going to push as commit a9d21c6.
Your commit was automatically rebased without conflicts. |
@phohensee Pushed as commit a9d21c6. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
@@ -2116,6 +2116,7 @@ JVM_ENTRY(jlong, jmm_GetTotalThreadAllocatedMemory(JNIEnv *env)) | |||
} | |||
|
|||
{ | |||
assert(MonitoringSupport_lock != nullptr, "Must be"); |
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.
This was unnecessary. If you have this here you would have one before every single use of mutex that is expected to be non-null.
MonitoringSupport_lock is initialized only when UseG1GC is true, but JDK-8304074 uses it to implement getTotalThreadAllocatedBytes, which is available for all garbage collectors. While the current code sets UseG1GC regardless of which collector is specified, see FLAG_SET_ERGO_IF_DEFAULT(UseG1GC, true) in gcConfig.cpp, if G1 isn't included in the Hotspot build or Hotspot is not running on a server class machine (unlikely these days), the lock will not be initialized. The lock's initialization should be unconditional.
I updated ThreadAllocatedMemory.java to run the test using both G1 and Serial collectors.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15028/head:pull/15028
$ git checkout pull/15028
Update a local copy of the PR:
$ git checkout pull/15028
$ git pull https://git.openjdk.org/jdk.git pull/15028/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15028
View PR using the GUI difftool:
$ git pr show -t 15028
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15028.diff
Webrev
Link to Webrev Comment