RFR: 8311602 GenShen: Decouple generational mode heuristics [v6]

William Kemper wkemper at openjdk.org
Mon Jul 17 23:32:33 UTC 2023


On Thu, 13 Jul 2023 23:58:05 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Record cycle end for old generation heuristic
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 139:
> 
>> 137:   ShenandoahHeuristics::record_success_concurrent(abbreviated);
>> 138: 
>> 139:   size_t available = MIN2(_heap_stats->available(), ShenandoahHeap::heap()->free_set()->available());
> 
> I am a little bit confused here.
> 
> I'd expect this to be gone with the changes in the upstream jdk PR: https://github.com/openjdk/jdk/pull/14856/files#diff-5ca0a05384b7b2604dd3c9b55d91a7010a42cd0ba246600c844e19821bd6b60b and to read simply:
> 
> 
> size_t available = _heap_stats->available();
> 
> 
> Can you help me understand why that is not the case?

This is vestigial. Not long ago, the freeset was not aware of generations and reported a single _total_ value for available memory. This value could be higher than was _logically_ available to the young generation, so we needed to explicitly choose the smaller of the two values. I'll fix this up. The implementation of `available` for the young generation now accounts for the freeset.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/292#discussion_r1266004286


More information about the shenandoah-dev mailing list