RFR: 8338780: GenShen: Fix up some comments [v2]

Y. Srinivas Ramakrishna ysr at openjdk.org
Mon Aug 26 16:17:47 UTC 2024


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

>> 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)

Thanks Kelvin! I'll convert this to a draft while I do a few experiments/investigations etc. along the lines of your suggestions... (Feel free to leave more comments here as necessary though; thanks!)

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

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


More information about the shenandoah-dev mailing list