RFR: 8303252: G1: Return early from Full-GC if no regions are selected for compaction. [v3]
Ivan Walulya
iwalulya at openjdk.org
Wed Mar 1 09:41:38 UTC 2023
On Tue, 28 Feb 2023 19:25:11 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1FullCollector.cpp line 334:
>>
>>> 332:
>>> 333: if (!has_compaction_targets()) {
>>> 334: return;
>>
>> Maybe it is useful to add a log message here that no compaction targets were found before exiting. Something like:
>>
>> log_debug(gc, phases) debug("Phase 2: No compaction targetes");
>>
>> So that people looking at logs have a better understanding why the other phases are skipped and the next log message will be about phase 5.
>
> Wouldn't `log_info(gc, phases) ("No Regions selected for compaction.` above (on the info level) already cover this?
It is fine for me either way, can keep both or leave just the log_info.
-------------
PR: https://git.openjdk.org/jdk/pull/12768
More information about the hotspot-gc-dev
mailing list