RFR: 8278482: G1: Improve HeapRegion::block_is_obj
Thomas Schatzl
tschatzl at openjdk.java.net
Sat Dec 11 11:21:09 UTC 2021
On Thu, 9 Dec 2021 11:19:39 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Adding assertions to `HeapRegion::block_is_obj` and its callers, and removing some dead code based on the assertions.
>
> Test: tier1-5
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/g1/heapRegion.cpp line 661:
> 659: // We cast p to an oop, so region-bottom must be an obj-start.
> 660: assert(is_starts_humongous(), "invariant");
> 661: }
I would prefer an `assert(!is_region_humongous || is_starts_humongous(), "....");` instead of the if. The change can keep the comment.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6781
More information about the hotspot-gc-dev
mailing list