RFR: Recompute generation accounts after fullgc [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Thu Mar 30 22:40:05 UTC 2023


On Thu, 30 Mar 2023 01:44:05 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:
>> 
>>   Reviewer feedback: change function name to ...restore_generation_usage()
>
> src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp line 1506:
> 
>> 1504:         young_regions++;
>> 1505:         young_usage += r->used();
>> 1506:         if (r->is_humongous()) {
> 
> Two nits:
> 
> 1. There is code in the two arms here that can be consolidated into a work method that can then be used to update the appropriate young or old metric.
> 2. It's conceptually simpler to check if is_humongous() and then add size of object if is_humongous_start. You can there also do arithmetic for the waste in the last humongous region for that object. Then you can just skip all the is_humongous_cont() regions, and save some time.
> 
> Other than that, this looks good to me.

Thanks.  I've refactored to reuse this code and reduced the amount of humongous processing effort to only trigger on is_humongous_start().

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/235#discussion_r1153852833


More information about the shenandoah-dev mailing list