RFR: Fix TestUnifiedLoggingSwitchStress test failure
Aleksey Shipilev
shade at redhat.com
Fri Jun 1 16:31:50 UTC 2018
On 06/01/2018 06:24 PM, Zhengyu Gu wrote:
>
>
> On 06/01/2018 12:02 PM, Aleksey Shipilev wrote:
>> On 06/01/2018 05:20 PM, Zhengyu Gu wrote:
>>> The test failed due to degenerated cycle, which takes over task queue from earlier cycle. Resetting
>>> task queue statistics under these circumstances, results assertion failures during
>>> print_statistics().
>>>
>>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/degen_tq_stats/webrev.00/
>>
>> What is the assert? Maybe we should do what G1 is doing, namely:
>
> 428 TASKQUEUE_STATS_ONLY(print_taskqueue_stats());
>
> will invoke TaskQueueStats::verify() and fail following assert:
>
> assert(get(push) == get(pop) + get(steal),
> "push=" SIZE_FORMAT " pop=" SIZE_FORMAT " steal=" SIZE_FORMAT,
> get(push), get(pop), get(steal));
So this is because taskqueues are not quiescent yet, right?
>> If we still need to do what you suggest, I think we are better off using the multiline-version:
>>
>> #if TASKQUEUE_STATS
>> // Do not reset task queue statistics if we are carrying over work
>> // in the task queues
>> if (!sh->is_degenerated_gc_in_progress()) {
>> reset_taskqueue_stats();
>> }
>> #endif
>
> okay: http://cr.openjdk.java.net/~zgu/shenandoah/degen_tq_stats/webrev.01/
Looks good.
But I still wonder why can't we simplify the whole thing? Remove the TQ stats block from
SCM::mark_from_roots() completely, move reset past the print in SCM::finish_mark_from_roots()? Let
the queues finish, and print+reset.
For example:
http://cr.openjdk.java.net/~shade/shenandoah/tq-why/webrev.01/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp.sdiff.html
-Aleksey
More information about the shenandoah-dev
mailing list