RFR(XS): 8240691: serviceability/sa/ClhsdbCDSJstackPrintAll.java and serviceability/sa/ClhsdbCDSCore.java not work with ZGC

Ioi Lam ioi.lam at oracle.com
Tue Mar 10 16:38:00 UTC 2020


Hi Chris,


The test uses this to check if CDS is on:

     List<String> cmds = List.of("flags UseSharedSpaces");
     String useSharedSpacesOutput = test.run(theApp.getPid(), cmds,
                                                     null, null);
     ....
     if (!useSharedSpacesOutput.contains("true")) {
         // CDS archive is not mapped. Skip the rest of the test.

The output looks like this:

     hsdb> hsdb> + verbose true
     hsdb> + flags UseSharedSpaces
     UseSharedSpaces = false command line
     hsdb> + quit

I think at one point the "if" worked, but the "+ verbose true" part of 
the log must have been added recently to cause the "if" to determine the 
wrong result.

Thanks
- Ioi



On 3/9/20 9:33 PM, Chris Plummer wrote:
> Hi Yumin,
>
> While your fix is a more bullet proof way of checking if CDS is on, 
> what was broken with the original version (was there a stray "false" 
> in the output"), and what does this have to do with ZGC?
>
> thanks,
>
> Chris
>
> On 3/9/20 8:06 PM, Yumin Qi wrote:
>>
>> Hi,
>>
>>     I made a change after discussed with Ioi, the test should check 
>> against UseSharedSpaces instead, it passed with/without change of 
>> 8240563 (tested in local). Also passed tier1,2,3.
>>
>>      URL: http://cr.openjdk.java.net/~minqi/8240691/webrev/
>>
>>
>>     Thanks
>>
>>      Yumin
>>
>>
>> On 3/6/20 2:26 PM, Yumin Qi wrote:
>>> HI,
>>>
>>>   Can I have your reviews on
>>>
>>>   Bug: https://bugs.openjdk.java.net/browse/JDK-8240691
>>>
>>>   webrev: http://cr.openjdk.java.net/~minqi/8240691/webrev/
>>>
>>>   Summary: With JDK-8232069 
>>> (https://bugs.openjdk.java.net/browse/JDK-8232069), CDS works with 
>>> UseCompressedOop and UseCompressedClassPointers off. The code for 
>>> detecting CDS will report false with ZGC since ZGC turned off those 
>>> two flags. The detection code will be changed in 
>>> JDK-8240563(https://bugs.openjdk.java.net/browse/JDK-8240563), this 
>>> will cause those two tests fail.
>>>
>>>
>>>    Tests: jtreg to show the tests not selected with ZGC.
>>>
>>>    Thanks
>>>
>>>    Yumin
>>>
>



More information about the hotspot-runtime-dev mailing list