Skip to content

Commit e604320

Browse files
author
Thomas Schatzl
committed
8264783: G1 BOT verification should not verify beyond allocation threshold
Reviewed-by: mli, ayang
1 parent cb2806d commit e604320

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ void G1BlockOffsetTablePart::alloc_block_work(HeapWord** threshold_, size_t* ind
327327
void G1BlockOffsetTablePart::verify() const {
328328
assert(_hr->bottom() < _hr->top(), "Only non-empty regions should be verified.");
329329
size_t start_card = _bot->index_for(_hr->bottom());
330-
size_t end_card = _bot->index_for(_hr->top() - 1);
330+
// Do not verify beyond the BOT allocation threshold.
331+
size_t end_card = MIN2(_bot->index_for(_hr->top() - 1), _next_offset_index - 1);
331332

332333
for (size_t current_card = start_card; current_card < end_card; current_card++) {
333334
u_char entry = _bot->offset_array(current_card);

src/hotspot/share/gc/g1/heapRegion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ void HeapRegion::verify(VerifyOption vo,
721721
p += obj_size;
722722
}
723723

724-
if (!is_young() && !is_empty()) {
724+
if (!is_empty()) {
725725
_bot_part.verify();
726726
}
727727

0 commit comments

Comments
 (0)