--- old/src/share/vm/gc/g1/satbQueue.cpp 2015-10-14 13:53:57.089303671 +0200 +++ new/src/share/vm/gc/g1/satbQueue.cpp 2015-10-14 13:53:56.983306235 +0200 @@ -74,30 +74,13 @@ // processing must be somewhat circumspect and not assume entries // in an unfiltered buffer refer to valid objects. -inline bool requires_marking(const void* entry, G1CollectedHeap* heap) { - // Includes rejection of NULL pointers. - assert(heap->is_in_reserved(entry), - err_msg("Non-heap pointer in SATB buffer: " PTR_FORMAT, p2i(entry))); - - HeapRegion* region = heap->heap_region_containing_raw(entry); - assert(region != NULL, err_msg("No region for " PTR_FORMAT, p2i(entry))); - if (entry >= region->next_top_at_mark_start()) { - return false; - } - - assert(((oop)entry)->is_oop(true /* ignore mark word */), - err_msg("Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry))); - - return true; -} - // This method removes entries from a SATB buffer that will not be // useful to the concurrent marking threads. Entries are retained if // they require marking and are not already marked. Retained entries // are compacted toward the top of the buffer. void ObjPtrQueue::filter() { - G1CollectedHeap* g1h = G1CollectedHeap::heap(); + CollectedHeap* heap = Universe::heap(); void** buf = _buf; size_t sz = _sz; @@ -124,7 +107,8 @@ // far, we'll just end up copying it to the same place. *p = NULL; - if (requires_marking(entry, g1h) && !g1h->isMarkedNext((oop)entry)) { + bool retain = heap->is_obj_ill(oop(entry)); + if (retain) { assert(new_index > 0, "we should not have already filled up the buffer"); new_index -= oopSize; assert(new_index >= i,