On Tue, 17 Nov 2020 10:56:44 GMT, Thomas Schatzl <tscha...@openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 4458: >> >>> 4456: heap_region_iterate(&cl); >>> 4457: >>> 4458: remove_from_old_gen_sets(0, 0, cl.humongous_regions_reclaimed()); >> >> Looking at this call and now having three parameters that are "optional" for >> `remove_from_old_gen_sets()` I wonder if it would be cleaner to have three >> functions, one for each set. It would increase the number of times we take >> the look, but we could restructure the code in `G1ReclaimEmptyRegionsTask` >> to not do the updates in the worker threads and that way only take the lock >> when there will be no contention. >> >> If you fell like this is outside the scope of this change, please file an >> issue instead. > > I am not very clear on what the problem there is and how the parameters are > optional. I do not completely understand how adding an extra method just for > this caller would improve the code significantly. > > I'll opt to defer this cleanup to a separate CR. Sounds good. ------------- PR: https://git.openjdk.java.net/jdk/pull/1163