< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp
Print this page
*** 31,49 ****
return &_mark_bit_map;
}
inline bool ShenandoahMarkingContext::mark(oop obj) {
shenandoah_assert_not_forwarded(NULL, obj);
! return (! allocated_after_mark_start(obj)) && _mark_bit_map.par_mark(obj);
}
inline bool ShenandoahMarkingContext::is_marked(oop obj) const {
! return allocated_after_mark_start(obj) || _mark_bit_map.is_marked(obj);
}
! inline bool ShenandoahMarkingContext::allocated_after_mark_start(oop obj) const {
! HeapWord* addr = cast_from_oop<HeapWord*>(obj);
uintx index = ((uintx) addr) >> ShenandoahHeapRegion::region_size_bytes_shift();
HeapWord* top_at_mark_start = _top_at_mark_starts[index];
bool alloc_after_mark_start = addr >= top_at_mark_start;
return alloc_after_mark_start;
}
--- 31,50 ----
return &_mark_bit_map;
}
inline bool ShenandoahMarkingContext::mark(oop obj) {
shenandoah_assert_not_forwarded(NULL, obj);
! HeapWord* addr = cast_from_oop<HeapWord*>(obj);
! return (! allocated_after_mark_start(addr)) && _mark_bit_map.par_mark(addr);
}
inline bool ShenandoahMarkingContext::is_marked(oop obj) const {
! HeapWord* addr = cast_from_oop<HeapWord*>(obj);
! return allocated_after_mark_start(addr) || _mark_bit_map.is_marked(addr);
}
! inline bool ShenandoahMarkingContext::allocated_after_mark_start(HeapWord* addr) const {
uintx index = ((uintx) addr) >> ShenandoahHeapRegion::region_size_bytes_shift();
HeapWord* top_at_mark_start = _top_at_mark_starts[index];
bool alloc_after_mark_start = addr >= top_at_mark_start;
return alloc_after_mark_start;
}
< prev index next >