RFR: 8328220: GenShen: Move generational mode operational parameters out of ShenandoahHeap

Y. Srinivas Ramakrishna ysr at openjdk.org
Mon Mar 18 23:50:43 UTC 2024


On Mon, 18 Mar 2024 23:28:31 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> * Many fields previously defined in `ShenandoahHeap` have been moved to `ShenandoahOldGeneration`.
>> * Generational specific serviceability has been moved to `ShenandoahGenerationalHeap`.
>> * Methods for sizing the old generation have been moved to `ShenandoahGenerationalHeap`.
>> * `ShenandoahGenerationalHeap::heap()` now asserts that the generational mode is active.
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 91:
> 
>> 89:   // budget is constrained by availability of free memory.
>> 90:   size_t old_evacuation_reserve = heap->old_generation()->get_evacuation_reserve();
>> 91:   size_t old_evacuation_budget = (size_t) ((double) old_evacuation_reserve / ShenandoahOldEvacWaste);
> 
> const

There may be others too that could may be be const'ed, if you could check please (I didn't check for any others). Thanks!

> src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp line 91:
> 
>> 89:   // This is young-gen collection or a mixed evacuation.
>> 90:   // If this is mixed evacuation, the old-gen candidate regions have already been added.
>> 91:   size_t max_cset = (size_t) (heap->young_generation()->get_evacuation_reserve() / ShenandoahEvacWaste);
> 
> const

free_target and min_garbage below can also be const'd.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/406#discussion_r1529455654
PR Review Comment: https://git.openjdk.org/shenandoah/pull/406#discussion_r1529459376


More information about the shenandoah-dev mailing list