RFR: 8270009: Factor out and shuffle methods in G1CollectedHeap::do_collection_pause_at_safepoint_helper

Thomas Schatzl tschatzl at openjdk.java.net
Mon Jul 12 08:12:03 UTC 2021

On Mon, 12 Jul 2021 07:18:06 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Hi all,
>>   can I get reviews for this change that factors out a few methods from `do_collection_pause_at_safepoint_helper` and reshuffles code from `gc_prologue`/`gc_epilogue` to be able to put those into parallel phase(s) later.
>> Testing: tier1-5
>> Thanks,
>>   Thomas
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3851:
>> 3849:   prepare_tlabs_for_mutator();
>> 3850: 
>> 3851:   gc_epilogue(false);
> I wonder if `gc_epilogue` could be made more explicit about what it includes, like its neighbors.

Not sure what you expect here. The only change (similar to `gc_prologue`) is to remove potentially parallelizable code (TLAB handling), and that it is now part of the "actual collection" scope. I added some comments to indicate what scope in the method is supposed to handle what.


PR: https://git.openjdk.java.net/jdk/pull/4744

More information about the hotspot-gc-dev mailing list