RFR: Fix TestUnifiedLoggingSwitchStress test failure

Zhengyu Gu zgu at redhat.com
Fri Jun 1 16:24:30 UTC 2018



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));

Added comments in places.

> 
>    TASKQUEUE_STATS_ONLY(print_taskqueue_stats());
>    TASKQUEUE_STATS_ONLY(reset_taskqueue_stats());
> 
> 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/

Thanks,

-Zhengyu


> 
> Thanks,
> -Aleksey
> 


More information about the shenandoah-dev mailing list