RFR(S): 8007772: G1: assert(!hr->isHumongous() || mr.start() == hr->bottom()) failed: the start of HeapRegion and MemRegion should be consistent for humongous regions
John Cuthbertson
john.cuthbertson at oracle.com
Mon Feb 11 20:28:42 UTC 2013
Hi Jesper,
On 2/11/2013 10:48 AM, Jesper Wilhelmsson wrote:
> John,
>
> Would it make sense to replace this code
[snip]
>
> with this code
>
>
> bool start_of_humongous = _curr_region->isHumongous() &&
> mr.start() == _curr_region->bottom();
>
> if (mr.is_empty() || start_of_humongous ||
> _nextMarkBitMap->iterate(&bitmap_closure, mr)) {
>
> if (start_of_humongous && _nextMarkBitMap->isMarked(mr.start())) {
> // The object is marked - apply the closure
> BitMap::idx_t offset = _nextMarkBitMap->heapWordToOffset(mr.start());
> bitmap_closure.do_bit(offset);
> }
> // Even if this task aborted while scanning the humongous object
> // we can (and should) give up the current region.
> giveup_current_region();
> regular_clock_call();
> } else {
>
Sure, semantically they're the same but it it any clearer? You have to
study the code and remember short-circuiting to realize that, if the
h-obj was marked, then we would not be applying the bitmap closure twice
(one in the iterate call and once directly), and (if the object is not
marked) that there's no redundant scanning of the bitmap.
JohnC
More information about the hotspot-gc-dev
mailing list