aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Thomas Schatzl <thomas.schatzl@oracle.com> 2021-03-30 16:00:51 +0200
committerGravatar Thomas Schatzl <thomas.schatzl@oracle.com> 2021-04-06 15:54:30 +0200
commit1ab7e29b34ac1617784dc2ce28e3af8d9c4c349c (patch)
treee747fe0063104582483322ea68fb2d15dd98e3f7
parenta611c462f938176d8fad303ec7a53191ce85c5d1 (diff)
downloadjdk-pr/3356.tar.gz
jdk-pr/3356.zip
Bot fixes for 2760pr/3356
-rw-r--r--src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp3
-rw-r--r--src/hotspot/share/gc/g1/heapRegion.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp b/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp
index 30843eb5d20..4db878ac651 100644
--- a/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp
+++ b/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp
@@ -327,7 +327,8 @@ void G1BlockOffsetTablePart::alloc_block_work(HeapWord** threshold_, size_t* ind
void G1BlockOffsetTablePart::verify() const {
assert(_hr->bottom() < _hr->top(), "Only non-empty regions should be verified.");
size_t start_card = _bot->index_for(_hr->bottom());
- size_t end_card = _bot->index_for(_hr->top() - 1);
+ // Do not verify beyond the BOT allocation threshold.
+ size_t end_card = MIN2(_bot->index_for(_hr->top() - 1), _next_offset_index - 1);
for (size_t current_card = start_card; current_card < end_card; current_card++) {
u_char entry = _bot->offset_array(current_card);
diff --git a/src/hotspot/share/gc/g1/heapRegion.cpp b/src/hotspot/share/gc/g1/heapRegion.cpp
index 7f96e981d86..791e1bfd61f 100644
--- a/src/hotspot/share/gc/g1/heapRegion.cpp
+++ b/src/hotspot/share/gc/g1/heapRegion.cpp
@@ -721,7 +721,7 @@ void HeapRegion::verify(VerifyOption vo,
p += obj_size;
}
- if (!is_young() && !is_empty()) {
+ if (!is_empty()) {
_bot_part.verify();
}