RFR: 8325516: Shenandoah: Move heap change tracking into ShenandoahHeap [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Feb 8 21:22:56 UTC 2024
On Thu, 8 Feb 2024 19:42:15 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Shenandoah sets a flag when new regions are allocated or retired. This flag currently resides in the control thread. Moving it into the heap reduces code duplication with upcoming generational mode changes.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>
> Use try_set for updating heap changed flag
LGTM; good cleanup! Minor doc suggestion.
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 298:
> 296: bool _gc_state_changed;
> 297: ShenandoahSharedBitmap _gc_state;
> 298: ShenandoahSharedFlag _heap_changed;
The documentation at `has_changed()` is good, but may be a single small documentation comment here, perhaps something like:
ShenandoahSharedFlag _heap_changed; // set if heap has changed since last check
or may be more elaborate:
// tracks if new regions have been allocated or retired since last check
-------------
Marked as reviewed by ysr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17777#pullrequestreview-1871273842
PR Review Comment: https://git.openjdk.org/jdk/pull/17777#discussion_r1483600601
More information about the hotspot-gc-dev
mailing list