< prev index next >

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

Print this page
rev 49524 : imported patch 8200426-g1h-refactoring
rev 49525 : [mq]: 8200426-sangheon-review

*** 60,70 **** } template <class T> inline void G1ScanClosureBase::handle_non_cset_obj_common(InCSetState const state, T* p, oop const obj) { if (state.is_humongous()) { ! _g1->set_humongous_is_live(obj); } } template <class T> inline void G1ScanEvacuatedObjClosure::do_oop_nv(T* p) { --- 60,70 ---- } template <class T> inline void G1ScanClosureBase::handle_non_cset_obj_common(InCSetState const state, T* p, oop const obj) { if (state.is_humongous()) { ! _g1h->set_humongous_is_live(obj); } } template <class T> inline void G1ScanEvacuatedObjClosure::do_oop_nv(T* p) {
*** 72,82 **** if (CompressedOops::is_null(heap_oop)) { return; } oop obj = CompressedOops::decode_not_null(heap_oop); ! const InCSetState state = _g1->in_cset_state(obj); if (state.is_in_cset()) { prefetch_and_push(p, obj); } else { if (HeapRegion::is_in_same_region(p, obj)) { return; --- 72,82 ---- if (CompressedOops::is_null(heap_oop)) { return; } oop obj = CompressedOops::decode_not_null(heap_oop); ! const InCSetState state = _g1h->in_cset_state(obj); if (state.is_in_cset()) { prefetch_and_push(p, obj); } else { if (HeapRegion::is_in_same_region(p, obj)) { return;
*** 159,176 **** } oop obj = CompressedOops::decode_not_null(o); check_obj_during_refinement(p, obj); ! assert(!_g1->is_in_cset((HeapWord*)p), "Oop originates from " PTR_FORMAT " (region: %u) which is in the collection set.", p2i(p), _g1->addr_to_region((HeapWord*)p)); ! const InCSetState state = _g1->in_cset_state(obj); if (state.is_in_cset()) { // Since the source is always from outside the collection set, here we implicitly know // that this is a cross-region reference too. prefetch_and_push(p, obj); } else { ! HeapRegion* to = _g1->heap_region_containing(obj); if (_from == to) { return; } handle_non_cset_obj_common(state, p, obj); to->rem_set()->add_reference(p, _worker_i); --- 159,176 ---- } oop obj = CompressedOops::decode_not_null(o); check_obj_during_refinement(p, obj); ! assert(!_g1h->is_in_cset((HeapWord*)p), "Oop originates from " PTR_FORMAT " (region: %u) which is in the collection set.", p2i(p), _g1h->addr_to_region((HeapWord*)p)); ! const InCSetState state = _g1h->in_cset_state(obj); if (state.is_in_cset()) { // Since the source is always from outside the collection set, here we implicitly know // that this is a cross-region reference too. prefetch_and_push(p, obj); } else { ! HeapRegion* to = _g1h->heap_region_containing(obj); if (_from == to) { return; } handle_non_cset_obj_common(state, p, obj); to->rem_set()->add_reference(p, _worker_i);
*** 183,193 **** if (CompressedOops::is_null(heap_oop)) { return; } oop obj = CompressedOops::decode_not_null(heap_oop); ! const InCSetState state = _g1->in_cset_state(obj); if (state.is_in_cset()) { prefetch_and_push(p, obj); } else { if (HeapRegion::is_in_same_region(p, obj)) { return; --- 183,193 ---- if (CompressedOops::is_null(heap_oop)) { return; } oop obj = CompressedOops::decode_not_null(heap_oop); ! const InCSetState state = _g1h->in_cset_state(obj); if (state.is_in_cset()) { prefetch_and_push(p, obj); } else { if (HeapRegion::is_in_same_region(p, obj)) { return;
*** 195,223 **** handle_non_cset_obj_common(state, p, obj); } } void G1ParCopyHelper::do_cld_barrier(oop new_obj) { ! if (_g1->heap_region_containing(new_obj)->is_young()) { _scanned_cld->record_modified_oops(); } } 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->mark_in_next_bitmap(_worker_id, 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. --- 195,223 ---- handle_non_cset_obj_common(state, p, obj); } } void G1ParCopyHelper::do_cld_barrier(oop new_obj) { ! if (_g1h->heap_region_containing(new_obj)->is_young()) { _scanned_cld->record_modified_oops(); } } void G1ParCopyHelper::mark_object(oop obj) { ! assert(!_g1h->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->mark_in_next_bitmap(_worker_id, 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(_g1h->heap_region_containing(from_obj)->in_collection_set(), "from obj should be in the CSet"); ! assert(!_g1h->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.
*** 235,245 **** oop obj = CompressedOops::decode_not_null(heap_oop); assert(_worker_id == _par_scan_state->worker_id(), "sanity"); ! const InCSetState state = _g1->in_cset_state(obj); if (state.is_in_cset()) { oop forwardee; markOop m = obj->mark(); if (m->is_marked()) { forwardee = (oop) m->decode_pointer(); --- 235,245 ---- oop obj = CompressedOops::decode_not_null(heap_oop); assert(_worker_id == _par_scan_state->worker_id(), "sanity"); ! const InCSetState state = _g1h->in_cset_state(obj); if (state.is_in_cset()) { oop forwardee; markOop m = obj->mark(); if (m->is_marked()) { forwardee = (oop) m->decode_pointer();
*** 257,267 **** if (barrier == G1BarrierCLD) { do_cld_barrier(forwardee); } } else { if (state.is_humongous()) { ! _g1->set_humongous_is_live(obj); } // The object is not in collection set. If we're a root scanning // closure during an initial mark pause then attempt to mark the object. if (do_mark_object == G1MarkFromRoot) { --- 257,267 ---- if (barrier == G1BarrierCLD) { do_cld_barrier(forwardee); } } else { if (state.is_humongous()) { ! _g1h->set_humongous_is_live(obj); } // The object is not in collection set. If we're a root scanning // closure during an initial mark pause then attempt to mark the object. if (do_mark_object == G1MarkFromRoot) {
*** 278,288 **** if (HeapRegion::is_in_same_region(p, obj)) { return; } ! HeapRegion* to = _g1->heap_region_containing(obj); HeapRegionRemSet* rem_set = to->rem_set(); rem_set->add_reference(p, _worker_id); } #endif // SHARE_VM_GC_G1_G1OOPCLOSURES_INLINE_HPP --- 278,288 ---- if (HeapRegion::is_in_same_region(p, obj)) { return; } ! HeapRegion* to = _g1h->heap_region_containing(obj); HeapRegionRemSet* rem_set = to->rem_set(); rem_set->add_reference(p, _worker_id); } #endif // SHARE_VM_GC_G1_G1OOPCLOSURES_INLINE_HPP
< prev index next >