RFR: 8272348: Update CDS tests in anticipation of JDK-8270489 [v3]
Yumin Qi
minqi at openjdk.java.net
Fri Aug 13 23:15:22 UTC 2021
On Fri, 13 Aug 2021 04:19:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> For testing https://github.com/openjdk/jdk/pull/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:
>>
>>
>> !WB.areSharedStringsIgnored() -> WB.areSharedStringsMapped()
>>
>> 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 API `WB.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:
>>
>> - ServiceLoaderTest.java: remove timestamp decorations from the logs
>> - DumpClassList.java: handle extra space characters that may appear in the tag decoration between square brackets.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> @iignatev comments -- sync up jdk/test/whitebox/WhiteBox.java to match the latest sun/hotspot/WhiteBox.java APIs
LG, one question of the added function handshakeReadMonitor
test/lib/jdk/test/whitebox/WhiteBox.java line 609:
> 607: // Handshakes
> 608: public native int handshakeWalkStack(Thread t, boolean all_threads);
> 609: public native boolean handshakeReadMonitors(Thread t);
Why is this function added?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5095
More information about the hotspot-runtime-dev
mailing list