RFR: 8293210: G1: Remove redundant check in G1FreeHumongousRegionClosure

Albert Mingkun Yang ayang at openjdk.org
Fri Sep 9 09:49:38 UTC 2022


On Fri, 9 Sep 2022 09:37:15 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Simple change of removing unnecessary code.
>> 
>> Test: hotspot_gc
>
> src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp line 187:
> 
>> 185:     if (!r->is_starts_humongous()) {
>> 186:       return false;
>> 187:     }
> 
> I think this check is a fast-path to quickly filter out definitely uninteresting regions, which will be nearly all of them.  I'm not convinced it should be removed.

It's the same argument as [JDK-8292858](https://bugs.openjdk.org/browse/JDK-8292858); the attr-table can (or should) be used instead of the region-type.

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

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



More information about the hotspot-gc-dev mailing list