< prev index next >
src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp
Print this page
rev 7970 : imported patch inc1
*** 220,250 ****
return _bm.par_clear_bit(heapWordToOffset(addr));
}
#undef check_mark
! inline bool CMTask::is_stale_humongous_queue_entry(oop obj) const {
// When a humongous object is eagerly reclaimed, we don't remove
! // entries for it from queues. Instead, we filter out such entries
! // on the processing side.
//
// Recently allocated objects are filtered out when queuing, to
// minimize queue size and processing time. Therefore, if we find
// what appears to be a recently allocated object in the queue, it
// must be for a reclaimed humongous object.
! HeapRegion* hr = _g1h->heap_region_containing_raw(obj);
! bool result = hr->obj_allocated_since_next_marking(obj);
#ifdef ASSERT
if (result) {
! HeapWord* hp = (HeapWord*)obj;
! assert(hp == hr->bottom(), "stale humongous should be at region bottom");
! assert(!_nextMarkBitMap->isMarked(hp), "stale humongous should not be marked");
}
#endif
return result;
}
inline void CMTask::push(oop obj) {
HeapWord* objAddr = (HeapWord*) obj;
assert(_g1h->is_in_g1_reserved(objAddr), "invariant");
assert(!_g1h->is_on_master_free_list(
_g1h->heap_region_containing((HeapWord*) objAddr)), "invariant");
--- 220,270 ----
return _bm.par_clear_bit(heapWordToOffset(addr));
}
#undef check_mark
! inline bool ConcurrentMark::is_stale_humongous_marked_entry(oop entry) const {
// When a humongous object is eagerly reclaimed, we don't remove
! // entries for it from mark stacks (either local or global).
! // Instead, we filter out such entries on the processing side.
//
// Recently allocated objects are filtered out when queuing, to
// minimize queue size and processing time. Therefore, if we find
// what appears to be a recently allocated object in the queue, it
// must be for a reclaimed humongous object.
! HeapRegion* hr = _g1h->heap_region_containing_raw(entry);
! bool result = hr->obj_allocated_since_next_marking(entry);
#ifdef ASSERT
if (result) {
! // If entry appears to be a stale humongous object, perform some
! // additional tests to increase our confidence in that belief.
! // We're limited in what tests we can perform, because a stale
! // entry is for an object that has already been reclaimed.
! HeapWord* hp = (HeapWord*)entry;
! assert(hp == hr->bottom(),
! err_msg("Stale humongous object should be at region bottom: object = "
! PTR_FORMAT ", region id %u, bottom = " PTR_FORMAT,
! p2i(hp), hr->hrm_index(), p2i(hr->bottom())));
! assert(!_nextMarkBitMap->isMarked(hp),
! err_msg("Stale humongous object should not be marked: object = "
! PTR_FORMAT ", region id %u, bottom = " PTR_FORMAT,
! p2i(hp), hr->hrm_index(), p2i(hr->bottom())));
}
#endif
return result;
}
+ inline void CMTask::process_queue_entry(oop entry) {
+ assert(_g1h->is_in_g1_reserved((HeapWord*)entry), "invariant" );
+
+ if (_cm->is_stale_humongous_marked_entry(entry)) {
+ statsOnly( ++stale_humongous_queue_entries );
+ } else {
+ scan_object(entry);
+ }
+ }
+
inline void CMTask::push(oop obj) {
HeapWord* objAddr = (HeapWord*) obj;
assert(_g1h->is_in_g1_reserved(objAddr), "invariant");
assert(!_g1h->is_on_master_free_list(
_g1h->heap_region_containing((HeapWord*) objAddr)), "invariant");
< prev index next >