src/share/vm/gc_implementation/g1/concurrentMark.hpp
Print this page
rev 2896 : 7121547: G1: High number mispredicted branches while iterating over the marking bitmap
Summary: 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:
*** 82,93 ****
"outside underlying space?");
return _bm.at(heapWordToOffset(addr));
}
// iteration
! bool iterate(BitMapClosure* cl) { return _bm.iterate(cl); }
! bool iterate(BitMapClosure* cl, MemRegion mr);
// Return the address corresponding to the next marked bit at or after
// "addr", and before "limit", if "limit" is non-NULL. If there is no
// such bit, returns "limit" if that is non-NULL, or else "endWord()".
HeapWord* getNextMarkedWordAddress(HeapWord* addr,
--- 82,93 ----
"outside underlying space?");
return _bm.at(heapWordToOffset(addr));
}
// iteration
! inline bool iterate(BitMapClosure* cl, MemRegion mr);
! inline bool iterate(BitMapClosure* cl);
// Return the address corresponding to the next marked bit at or after
// "addr", and before "limit", if "limit" is non-NULL. If there is no
// such bit, returns "limit" if that is non-NULL, or else "endWord()".
HeapWord* getNextMarkedWordAddress(HeapWord* addr,