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

Leonid Mesnik Leonid.Mesnik at oracle.com
Wed Nov 26 14:56:25 UTC 2014


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/20141126/37773c67/attachment.htm>


More information about the hotspot-gc-dev mailing list