Attached is the spreadsheet summarizing Intel's experiment increasing MarkStackSize manually vs count of
'[GC concurrent-mark-reset-for-overflow]'
The observation is we do not expand MarkStackSize to MarkStackSizeMax when concurrent-mark-overflow happens. They have to increase it manually.
The expand flag is set when concurrent-mark-reset-for-overflow happens.
The issue is we try to expand markStack in void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs)
If there is no overflow, at the end, we call set_non_marking_state(); then try to expand markStack.
set_non_marking_state() calls reset_marking_state and reset expand based on _cm->has_overflown(_cm overflow is cleaned during marking). So when we check if (_markStack.should_expand()), it is always false.