RFR: 8338780: GenShen: Fix up some comments

Kelvin Nilsen kdnilsen at openjdk.org
Thu Aug 22 18:19:35 UTC 2024


On Thu, 22 Aug 2024 18:02:32 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> I'll run some testing with another assert at the code at line 55 to check my (mis)understanding.
>
> You are correct.  In ShenandoahGenerationalHeuristics::choose_collection_set(), we only call prime_collection_set() if generation->is_young().  For global collections, we will not prime the collection set, which means we will not preselect any regions for promotion.
> 
> Given this reality, we can remove the call to add_preselected_regions_to_collection_SET() from ShenandoahGlobalHeuristics::choose_collection_set_from_regiondata().  Keeping the assertion in place is how we know it was safe to remove the call to add preselected regions.
> 
> We could do some archeology on the code to remind ourselves how we got here.  But maybe not necessary.

Could lines 114-118 be replaced with: assert(!cset->is_preselected(r->index(), comment)

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/484#discussion_r1727611561


More information about the shenandoah-dev mailing list