RFR: 8332851: Shenandoah: Update refs iterator does not need to be a member of ShenandoahHeap
William Kemper
wkemper at openjdk.org
Fri May 24 14:43:06 UTC 2024
On Fri, 24 May 2024 02:05:07 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> The iterator is used outside of Shenandoah heap to support an assert, and must be 'reset' for correctness. These iterators are typically used as a local variable, and we can do that with this iterator as well to simplify the code.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2230:
>
>> 2228: workers()->run_task(&task);
>> 2229: }
>> 2230: assert(cancelled_gc() || !update_refs_iterator.has_next(), "Should have finished update references");
>
> Help me out here... Can a degenerate GC never pick up in the midst of an update_refs phase, continuing work left from the point of interruption without having to start from scratch?
Yes! It can! Good catch! I'll abandon this PR and fix up `shenandoah:master`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19376#discussion_r1613588878
More information about the shenandoah-dev
mailing list