RFR: Handle old, pinned regions [v7]

William Kemper wkemper at openjdk.org
Thu Aug 4 22:13:31 UTC 2022


On Thu, 4 Aug 2022 21:33:42 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> Lot of code here. Thanks for working through it.

Many of the changed files are just to have `ShenandoahHeap::old_generation()` return a `ShenandoahOldGeneration` pointer to eliminate a lot of ugly downcasts.

> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 349:
> 
>> 347:   // Cannot start a new old-gen GC until previous one has finished.
>> 348:   //
>> 349:   // Future refinement: under certain circumstances, we might be more sophisticated about this choice.
> 
> This comment is stale, with the new implementation.  My thought when I wrote the comment was that we cannot "abandon" the identified set of old-gen collection candidates in order to start up a new old-gen collection until the mixed evacuations have completely processed all old-gen collection candidates.  That's because we would have to introduce a "new" phase to coalesce and fill these regions if we choose not to collect them.  But in the new design, it seems like we have the flexibility to decide for more reasons than just pinning that certain candidate regions will not be collected.  For example, if we have some reason to believe that a lot of old-gen memory has newly become garbage, then it might be "best" to abandon the collection set candidates as is and start a new old-gen marking effort.  Not asking for a lot of change here - maybe just a mention in the comment that we have new freedoms that we didn't use to have.

Sure - I will update the comment.

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

PR: https://git.openjdk.org/shenandoah/pull/149


More information about the shenandoah-dev mailing list