RFR: 8270009: Factor out and shuffle methods in G1CollectedHeap::do_collection_pause_at_safepoint_helper
tschatzl at openjdk.java.net
Mon Jul 12 07:52:56 UTC 2021
On Sun, 11 Jul 2021 22:06:46 GMT, Kim Barrett <kbarrett 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
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3020:
>> 3018: ResourceMark rm;
>> 3020: IsGCActiveMark active_gc_mark;
> Moving the IsGCActiveMark here expands the scope of is_gc_active() being true to cover areas it didn't used to. I _think_ this is okay, but I didn't check all callers carefully.
None of the code before that (verification, timing setup, heap printing) should be dependent on that. Actually I was considering moving the mark right after the guarantee in `G1CollectedHeap::do_collection_pause_at_safepoint`, but then I reconsidered due to the `GCLocker` check there.
More information about the hotspot-gc-dev