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
8272348: Update CDS tests in anticipation of JDK-8270489 #5095
8272348: Update CDS tests in anticipation of JDK-8270489 #5095
Conversation
|
/label remove hotspot |
@iklam |
@iklam |
Webrevs
|
public native boolean areSharedStringsIgnored(); | ||
public native boolean areSharedStringsMapped(); | ||
public native boolean isSharedInternedString(String s); |
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 also update jdk.test.whitebox.WhiteBox
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 have synced jdk/test/whitebox/WhiteBox.java to match the latest APIs in sun/hotspot/WhiteBox.java
…h the latest sun/hotspot/WhiteBox.java APIs
@iklam This change now passes all automated pre-integration checks. 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 22 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.
|
LG, one question of the added function handshakeReadMonitor
@@ -605,6 +606,7 @@ public Object getMethodOption(Executable method, String name) { | |||
|
|||
// Handshakes | |||
public native int handshakeWalkStack(Thread t, boolean all_threads); | |||
public native boolean handshakeReadMonitors(Thread t); |
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.
Why is this function added?
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.
We have two WhiteBox classes: sun.hotspot.WhiteBox and jdk.test.whitebox.WhiteBox. They should have the exact same contents, but handshakeReadMonitors is missing from jdk.test.whitebox.WhiteBox. So I added it since I am changing this file.
https://bugs.openjdk.java.net/browse/JDK-8271707 will remove sun.hotspot.WhiteBox so we won't have this duplication anymore.
Thanks @iignatev @calvinccheung and @yminqi for your review. |
Going to push as commit 36e2dda.
Your commit was automatically rebased without conflicts. |
For testing #5074 (Support archived heap objects in EpsilonGC), some CDS tests should be updated:
(1) Add
@require vm.gc == null
to mark test cases that will fail if a collector is explicitly specified using-XX:+UseXXXGC
(2) Rename this WhiteBox API to reflect what it checks:
With EpsilonGC, the shared strings are not "ignored", but they are also not "mapped" either (they are copied into the Java heap). The existing tests are for mapped strings only, so they should check for
WB.areSharedStringsMapped()
.(3) For test cases that check if a heap object is a shared interned string, instead of the generic
WB.isShared(Object o)
API, use a new specific APIWB.isSharedInternedString(String s)
. This API currently works only for "mapped shared strings", but in the future we may enhance it to check for "loaded shared strings" by EpsilonGC.(4) Also fix the two test cases that were sensitive to irregular -Xlog output:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5095/head:pull/5095
$ git checkout pull/5095
Update a local copy of the PR:
$ git checkout pull/5095
$ git pull https://git.openjdk.java.net/jdk pull/5095/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5095
View PR using the GUI difftool:
$ git pr show -t 5095
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5095.diff