RFR: 8357218: G1: Remove loop in G1CollectedHeap::try_collect_fullgc
Thomas Schatzl
tschatzl at openjdk.org
Mon May 19 12:02:53 UTC 2025
On Mon, 19 May 2025 08:46:48 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Simple removing unnecessary loop in "caller" of `VM_G1CollectFull`, because an explicit full-gc always run-to-completion.
>>
>> Test: tier1-3
>
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 1864:
>
>> 1862:
>> 1863: bool G1CollectedHeap::try_collect_fullgc(GCCause::Cause cause,
>> 1864: const G1GCCounters& counters_before) {
>
> There does not seem to be a reason to keep this helper method. It's the same complexity as the attempt to do a young collection in `try_collect()` now.
>
> Or move the attempt to do a young collection to a helper method for consistency.
Fwiw, there is `G1CollectedHeap::do_collection_pause()`that might fit exactly already.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25296#discussion_r2095520960
More information about the hotspot-gc-dev
mailing list