RFR 8065579: WB method to start G1 concurrent mark cycle should be introduced
Stefan Johansson
stefan.johansson at oracle.com
Mon Nov 24 12:23:31 UTC 2014
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/20141124/55207546/attachment.htm>
More information about the hotspot-gc-dev
mailing list