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

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


On Sat, 13 Apr 2024 00:39:44 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:
>> 
>>   Move trigger code to ShenandoahOldHeuristics from ShenandoahOldGeneration
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 548:
> 
>> 546: }
>> 547: 
>> 548: void ShenandoahOldHeuristics::trigger_collection_if_fragmented(ShenandoahGenerationalHeap* gen_heap, ShenandoahOldGeneration* old_gen,
> 
> Should `ShenandoahOldHeurtitics` just keep pointers to `gen_heap` and `old_gen`, and slim down these APIs so these don't need to be passed around? (Similarly `ShenandoahYoungHeuristics`?)

Agreed.  Implemented.

> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 579:
> 
>> 577:       double density_threshold = (eighths - 2) / 8.0;
>> 578:       if ((old_region_span >= span_threshold) && (old_density < density_threshold)) {
>> 579:         gen_heap->old_heuristics()->trigger_old_is_fragmented(old_density, first_old_region, last_old_region);
> 
> Just `trigger_old_is_fragmented()` because `gen_heap->old_heuristics()` is `this` ?

Thanks. Corrected.

> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 595:
> 
>> 593:          old_gen->used(), old_gen->get_humongous_waste(), gen_heap->capacity());
>> 594:   if (old_used > trigger_threshold) {
>> 595:     gen_heap->old_heuristics()->trigger_old_has_grown();
> 
> Just `trigger_old_has_grown()` because `gen_heap->old_heuristics()` is the same as`this` ?

Thanks.  Corrected.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/409#discussion_r1566200544
PR Review Comment: https://git.openjdk.org/shenandoah/pull/409#discussion_r1566203591
PR Review Comment: https://git.openjdk.org/shenandoah/pull/409#discussion_r1566204093


More information about the shenandoah-dev mailing list