RFR: 8337511: Implement JEP 404: Generational Shenandoah (Experimental) [v7]

Aleksey Shipilev shade at openjdk.org
Thu Nov 21 18:33:42 UTC 2024


On Wed, 20 Nov 2024 00:13:13 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 420:
>> 
>>> 418:   }
>>> 419:   int gc_state = _heap->gc_state();
>>> 420:   if ((gc_state & ShenandoahHeap::YOUNG_MARKING) != 0) {
>> 
>> It is not very clear this works fine with single-gen mode. Does `MARKING` imply `YOUNG_MARKING` in single-gen mode? I think we better make it abundantly clear with `is_generational()` checks.
>
> Yes, in single gen mode we set `MARKING` and `YOUNG_MARKING` together. See https://github.com/openjdk/shenandoah/blob/master/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp#L81

We should really either predicate it on generational mode (we already poll it a few lines below) and check for `MARKING` specifically, or assert it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21273#discussion_r1852659199


More information about the serviceability-dev mailing list