RFR: 8328307: GenShen: Re-enable old-has-grown trigger for old-generation GC [v5]

Kelvin Nilsen kdnilsen at openjdk.org
Mon Apr 15 17:31:19 UTC 2024


On Mon, 1 Apr 2024 15:39:06 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix another typo
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 3202:
> 
>> 3200: 
>> 3201:   if (mode()->is_generational()) {
>> 3202:     ShenandoahGenerationalHeap* gen_heap = (ShenandoahGenerationalHeap*) this;
> 
> One other question: would something like this not be under the purview of the appropriate heuristics object associated with the heap? May be ShenandoahOldHeuristics? Just wondering about the correct abstraction boundaries here.
> 
> How does the regular (non-generational collector) do this following the rebuild?

Thanks.  Moving these trigger functions into OldHeuristics

> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 510:
> 
>> 508: }
>> 509: 
>> 510: void ShenandoahOldGeneration::trigger_collection_if_fragmented(ShenandoahGenerationalHeap* gen_heap, size_t first_old_region,
> 
> As pointed out further above, would this more naturally belong here or in ShenandoahOldHeuristics? There are a bunch of triggers & checks there as well. Would appear to make sense to keep all of this in one place rather than scattering them between generation and heuristic for clear abstraction boundaries and maintainability of code.

Agreed.  Thanks.  Moved.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/409#discussion_r1566199418
PR Review Comment: https://git.openjdk.org/shenandoah/pull/409#discussion_r1566199674


More information about the shenandoah-dev mailing list