Skip to content
Permalink
Browse files
8271896: Remove unnecessary top address checks in BOT
Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Aug 6, 2021
1 parent e7b6f48 commit c2b7facea442eda470913546001c9a5e35d18929
Showing 3 changed files with 1 addition and 5 deletions.
@@ -235,7 +235,6 @@ HeapWord* G1BlockOffsetTablePart::forward_to_block_containing_addr_slow(HeapWord
"next_boundary is beyond the end of the covered region "
" next_boundary " PTR_FORMAT " _array->_end " PTR_FORMAT,
p2i(next_boundary), p2i(_bot->_reserved.end()));
if (addr >= _hr->top()) return _hr->top();
while (next_boundary < addr) {
while (n <= next_boundary) {
q = n;
@@ -132,7 +132,6 @@ inline HeapWord* G1BlockOffsetTablePart::block_at_or_preceding(const void* addr)

inline HeapWord* G1BlockOffsetTablePart::forward_to_block_containing_addr_const(HeapWord* q, HeapWord* n,
const void* addr) const {
if (addr >= _hr->top()) return _hr->top();
while (n <= addr) {
q = n;
oop obj = cast_to_oop(q);
@@ -178,9 +178,7 @@ inline bool HeapRegion::is_obj_dead(const oop obj, const G1CMBitMap* const prev_
}

inline size_t HeapRegion::block_size(const HeapWord *addr) const {
if (addr == top()) {
return pointer_delta(end(), addr);
}
assert(addr < top(), "precondition");

if (block_is_obj(addr)) {
return cast_to_oop(addr)->size();

1 comment on commit c2b7fac

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c2b7fac Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.