RFR: 8293210: G1: Remove redundant check in G1FreeHumongousRegionClosure
Kim Barrett
kbarrett at openjdk.org
Fri Sep 9 09:41:53 UTC 2022
On Thu, 1 Sep 2022 11:17:27 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change of removing unnecessary code.
>
> Test: hotspot_gc
src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp line 236:
> 234:
> 235: inline bool G1CollectedHeap::is_humongous_reclaim_candidate(uint region) {
> 236: assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object");
I think I like the semantic requirement that this only be applied to starts-humongous regions. Unless there is some future change that needs this removal (and not just because of the change to G1FreeHumongousRegionClosure::do_heap_region that I don't like), then I'd prefer it stay.
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.
-------------
PR: https://git.openjdk.org/jdk/pull/10119
More information about the hotspot-gc-dev
mailing list