RFR: 8332851: Shenandoah: Update refs iterator does not need to be a member of ShenandoahHeap

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri May 24 02:08:01 UTC 2024


On Fri, 24 May 2024 00:21:30 GMT, William Kemper <wkemper 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?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19376#discussion_r1612594755


More information about the hotspot-gc-dev mailing list