mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8055816: Remove dead code in g1BlockOffsetTable
Reviewed-by: tschatzl, mgerdin
This commit is contained in:
parent
9086b5795f
commit
bbe82cb85b
5 changed files with 13 additions and 374 deletions
|
@ -322,29 +322,6 @@ bool HeapRegion::claimHeapRegion(jint claimValue) {
|
|||
return false;
|
||||
}
|
||||
|
||||
HeapWord* HeapRegion::next_block_start_careful(HeapWord* addr) {
|
||||
HeapWord* low = addr;
|
||||
HeapWord* high = end();
|
||||
while (low < high) {
|
||||
size_t diff = pointer_delta(high, low);
|
||||
// Must add one below to bias toward the high amount. Otherwise, if
|
||||
// "high" were at the desired value, and "low" were one less, we
|
||||
// would not converge on "high". This is not symmetric, because
|
||||
// we set "high" to a block start, which might be the right one,
|
||||
// which we don't do for "low".
|
||||
HeapWord* middle = low + (diff+1)/2;
|
||||
if (middle == high) return high;
|
||||
HeapWord* mid_bs = block_start_careful(middle);
|
||||
if (mid_bs < addr) {
|
||||
low = middle;
|
||||
} else {
|
||||
high = mid_bs;
|
||||
}
|
||||
}
|
||||
assert(low == high && low >= addr, "Didn't work.");
|
||||
return low;
|
||||
}
|
||||
|
||||
HeapRegion::HeapRegion(uint hrm_index,
|
||||
G1BlockOffsetSharedArray* sharedOffsetArray,
|
||||
MemRegion mr) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue