8271896: Remove unnecessary top address checks in BOT
Reviewed-by: tschatzl, iwalulya
This commit is contained in:
parent
e7b6f48182
commit
c2b7facea4
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user