RFR: 8293210: G1: Remove redundant check in G1FreeHumongousRegionClosure [v2]

Kim Barrett kbarrett at openjdk.org
Mon Sep 19 11:39:57 UTC 2022


On Mon, 19 Sep 2022 10:57:12 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Simple change of removing unnecessary code.
>> 
>> Test: hotspot_gc
>
> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - index-iteration
>  - Merge branch 'master' into g1-entail-2
>  - g1-entail-2

Looks good.  One optional suggestion.

src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp line 192:

> 190:     }
> 191: 
> 192:     G1CollectedHeap* g1h = G1CollectedHeap::heap();

Maybe look up the heap once at closure construction time, caching it in a data member?

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

Marked as reviewed by kbarrett (Reviewer).

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



More information about the hotspot-gc-dev mailing list