RFR: 8278289: Drop G1BlockOffsetTablePart::_object_can_span

Thomas Schatzl tschatzl at openjdk.java.net
Mon Dec 6 11:56:13 UTC 2021


On Mon, 6 Dec 2021 10:24:26 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple change of dropping a debug-only field. Instead, the assert logic queries for the region type directly.
> 
> Test: tier1-5

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp line 118:

> 116: #ifdef ASSERT
> 117:   if (!_hr->is_continues_humongous()) {
> 118:     // For non ContinuesHumongous regions, the first obj always starts from bottom.

Suggestion:

    // For non-ContinuesHumongous regions, the first obj always starts from bottom.

src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp line 120:

> 118:     // For non ContinuesHumongous regions, the first obj always starts from bottom.
> 119:     u_char offset = _bot->offset_array(_bot->index_for(_hr->bottom()));
> 120:     assert(offset == 0, "Found offset %u instead of 0", offset);

Please add region# too here, maybe even the region's short type string (that can be gained from the `hs_err` file though).

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

PR: https://git.openjdk.java.net/jdk/pull/6718



More information about the hotspot-gc-dev mailing list