< prev index next >
src/share/vm/gc/g1/g1OopClosures.inline.hpp
Print this page
rev 13253 : imported patch 8183539-remove-into-cset-dcqs
rev 13256 : imported patch overflow-queue-mechanics-change
rev 13261 : imported patch 8184348-merge-par_mark-and_gray_root
*** 97,111 ****
}
template <class T>
inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
T heap_oop = oopDesc::load_heap_oop(p);
! if (!oopDesc::is_null(heap_oop)) {
! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
! HeapRegion* hr = _g1h->heap_region_containing((HeapWord*) obj);
! _cm->grayRoot(obj, hr);
}
}
template <class T>
inline static void check_obj_during_refinement(T* p, oop const obj) {
#ifdef ASSERT
--- 97,111 ----
}
template <class T>
inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
T heap_oop = oopDesc::load_heap_oop(p);
! if (oopDesc::is_null(heap_oop)) {
! return;
}
+ oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
+ _cm->mark_in_next_bitmap(obj);
}
template <class T>
inline static void check_obj_during_refinement(T* p, oop const obj) {
#ifdef ASSERT
*** 207,233 ****
}
void G1ParCopyHelper::mark_object(oop obj) {
assert(!_g1->heap_region_containing(obj)->in_collection_set(), "should not mark objects in the CSet");
! // We know that the object is not moving so it's safe to read its size.
! _cm->grayRoot(obj);
}
void G1ParCopyHelper::mark_forwarded_object(oop from_obj, oop to_obj) {
assert(from_obj->is_forwarded(), "from obj should be forwarded");
assert(from_obj->forwardee() == to_obj, "to obj should be the forwardee");
assert(from_obj != to_obj, "should not be self-forwarded");
assert(_g1->heap_region_containing(from_obj)->in_collection_set(), "from obj should be in the CSet");
assert(!_g1->heap_region_containing(to_obj)->in_collection_set(), "should not mark objects in the CSet");
! // The object might be in the process of being copied by another
! // worker so we cannot trust that its to-space image is
! // well-formed. So we have to read its size from its from-space
! // image which we know should not be changing.
! _cm->grayRoot(to_obj);
}
template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
template <class T>
void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_work(T* p) {
--- 207,228 ----
}
void G1ParCopyHelper::mark_object(oop obj) {
assert(!_g1->heap_region_containing(obj)->in_collection_set(), "should not mark objects in the CSet");
! _cm->mark_in_next_bitmap(obj);
}
void G1ParCopyHelper::mark_forwarded_object(oop from_obj, oop to_obj) {
assert(from_obj->is_forwarded(), "from obj should be forwarded");
assert(from_obj->forwardee() == to_obj, "to obj should be the forwardee");
assert(from_obj != to_obj, "should not be self-forwarded");
assert(_g1->heap_region_containing(from_obj)->in_collection_set(), "from obj should be in the CSet");
assert(!_g1->heap_region_containing(to_obj)->in_collection_set(), "should not mark objects in the CSet");
! _cm->mark_in_next_bitmap(to_obj);
}
template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
template <class T>
void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_work(T* p) {
< prev index next >