RFR 8065579: WB method to start G1 concurrent mark cycle should be introduced

Leonid Mesnik Leonid.Mesnik at oracle.com
Wed Nov 26 23:10:53 UTC 2014


Stefan

Thank you for review.

Could I have review from Reviewer for this fix?

Leonid
On 26.11.2014 19:58, Stefan Johansson wrote:
> Hi Leonid,
>
> This looks good. I can sponsor and push the change but we need a 
> Reviewer that looks at the change first.
>
> Thanks,
> Stefan
>
> On 2014-11-26 15:56, Leonid Mesnik wrote:
>> Stefan
>>
>> Thank you for reviewing fix.
>>
>> Here is update version:
>> http://cr.openjdk.java.net/~sjohanss/lmesnik/8065579/hotspot.01/ 
>> <http://cr.openjdk.java.net/%7Esjohanss/lmesnik/8065579/hotspot.01/>
>>
>> I simplified test to be more robust. It tests only that we could 
>> start mark cycle after young/full GC and when concurrent mark cycle 
>> is not in progress.
>>
>> Leonid
>>
>> On 24.11.2014 15:23, Stefan Johansson wrote:
>>> Hi Leonid,
>>>
>>> I think the changes for making it possible to trigger a marking 
>>> cycle through the WB API looks good. There are however some problems 
>>> with the test.
>>> ---
>>>   24         assertTrue(wb.g1StartConcMarkCycle());
>>>   25         wb.fullGC();
>>>   26         assertTrue(wb.g1StartConcMarkCycle());
>>>
>>> Here the test assumes that it should be able to trigger a new 
>>> marking cycle since the Full-GC have aborted the previous one, but 
>>> it is possible that the concurrent mark thread hasn't yet finished 
>>> the cycle even if it has been aborted. That is, during cycle will 
>>> return true for some time after the concurrent mark has been aborted.
>>> ---
>>>   28         while (wb.g1InConcurrentMark()) {
>>>   29             assertFalse(wb.g1StartConcMarkCycle());
>>>   30         }
>>>   31
>>>   32         assertTrue(wb.g1StartConcMarkCycle());
>>>   33
>>>   34         while (wb.g1InConcurrentMark()) {
>>>   35             assertFalse(wb.g1StartConcMarkCycle());
>>>   36         }
>>>
>>> Here the problem is that we can't guarantee that the concurrent 
>>> cycle won't finish just before the call to 
>>> wb.g1StartConcMarkCycle(), and therefor the assert might fail.
>>> ---
>>>
>>> I'm not sure how you want to improve the test to avoid these 
>>> problems, the only really robust way I think is to only use the 
>>> g1InConcurrentMark() call to wait until marking is finished and then 
>>> assert that we can trigger a new cycle.
>>>
>>> Thanks,
>>> Stefan
>>>
>>> On 2014-11-20 16:13, Leonid Mesnik wrote:
>>>> Hi
>>>>
>>>> Here is the fix which introduce WB method which stars concurrent 
>>>> mark cycle explicitly. It is needed to make CM cycle related tests 
>>>> more stable.
>>>>
>>>> Changeset also includes test and very small fix of WB method 
>>>> g1InConcurrentMark .
>>>> Fix pass JPRT with hotspot testset.
>>>>
>>>> JIRA: https://bugs.openjdk.java.net/browse/JDK-8065579
>>>> Webrev: 
>>>> http://cr.openjdk.java.net/~sjohanss/lmesnik/8065579/hotspot.00/
>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20141127/130c1de9/attachment.htm>


More information about the hotspot-gc-dev mailing list