mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
7121547: G1: High number mispredicted branches while iterating over the marking bitmap
There is a high number of mispredicted branches associated with calling BitMap::iteratate() from within CMBitMapRO::iterate(). Implement a version of CMBitMapRO::iterate() directly using inline-able routines. Reviewed-by: tonyp, iveresov
This commit is contained in:
parent
1b06646e3f
commit
dac656c955
4 changed files with 56 additions and 16 deletions
|
@ -104,17 +104,6 @@ int CMBitMapRO::heapWordDiffToOffsetDiff(size_t diff) const {
|
|||
return (int) (diff >> _shifter);
|
||||
}
|
||||
|
||||
bool CMBitMapRO::iterate(BitMapClosure* cl, MemRegion mr) {
|
||||
HeapWord* left = MAX2(_bmStartWord, mr.start());
|
||||
HeapWord* right = MIN2(_bmStartWord + _bmWordSize, mr.end());
|
||||
if (right > left) {
|
||||
// Right-open interval [leftOffset, rightOffset).
|
||||
return _bm.iterate(cl, heapWordToOffset(left), heapWordToOffset(right));
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void CMBitMapRO::mostly_disjoint_range_union(BitMap* from_bitmap,
|
||||
size_t from_start_index,
|
||||
HeapWord* to_start_word,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue