RFR: 8303252: G1: Return early from Full-GC if no regions are selected for compaction. [v2]

Albert Mingkun Yang ayang at openjdk.org
Tue Feb 28 19:28:07 UTC 2023


On Tue, 28 Feb 2023 10:36:09 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Thomas review
>
> 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?

-------------

PR: https://git.openjdk.org/jdk/pull/12768


More information about the hotspot-gc-dev mailing list