RFR: 8069367: assert(_nextMarkBitMap->isMarked((HeapWord*) obj)) failed

Kim Barrett kim.barrett at oracle.com
Sat Mar 28 04:31:53 UTC 2015

On Mar 27, 2015, at 4:22 PM, Jon Masamitsu <jon.masamitsu at oracle.com> wrote:
> Kim,
> http://cr.openjdk.java.net/~kbarrett/8069367/webrev.02/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.frames.html
> Can you explain this to me
> 3498       HeapRegionRemSet* const rset = region->rem_set();
> 3499       if (G1EagerReclaimHumongousObjectsWithStaleRefs) {
> 3500         return rset->occupancy_less_or_equal_than(G1RSetSparseRegionEntries);
> 3501       } else {
> I understand that if there remembered set is empty, then no problem.  I don't
> understand why the test on the occupancy is allowing early reclaiming.

The contents of the remembered set might be stale, due to concurrent mutator action.

The heuristic being used here is that if the size of the remembered set is small then it
is worth re-evaluating it, with the possibility that the result will be empty.  Empirically,
for some real applications, this heuristic provides good results.  This is from

> That's my only question and it is for my education so you can
> consider this a complete 2nd review.

Well, there may be further changes.  Thomas and Bengt wondered if excluding typeArrays
allocated before the start of the in-progress concurrent mark might matter.  I’ve been looking
at a way to still allow that.

Though maybe the version that has been reviewed is good enough, and the possible further
improvement can be done as followup work?  Bengt and Thomas?

More information about the hotspot-gc-dev mailing list