src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/g1

src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp

Print this page
rev 5732 : [mq]: comments2


 160   // Do the safe subset of is_oop
 161   if (obj != NULL) {
 162 #ifdef CHECK_UNHANDLED_OOPS
 163     oopDesc* o = obj.obj();
 164 #else
 165     oopDesc* o = obj;
 166 #endif // CHECK_UNHANDLED_OOPS
 167     assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned");
 168     assert(Universe::heap()->is_in_reserved(obj), "must be in heap");
 169   }
 170 #endif // ASSERT
 171 
 172   assert(_from != NULL, "from region must be non-NULL");
 173   assert(_from->is_in_reserved(p), "p is not in from");
 174 
 175   HeapRegion* to = _g1->heap_region_containing(obj);
 176   if (to != NULL && _from != to) {
 177     // The _record_refs_into_cset flag is true during the RSet
 178     // updating part of an evacuation pause. It is false at all
 179     // other times:
 180     //  * rebuilding the rembered sets after a full GC
 181     //  * during concurrent refinement.
 182     //  * updating the remembered sets of regions in the collection
 183     //    set in the event of an evacuation failure (when deferred
 184     //    updates are enabled).
 185 
 186     if (_record_refs_into_cset && to->in_collection_set()) {
 187       // We are recording references that point into the collection
 188       // set and this particular reference does exactly that...
 189       // If the referenced object has already been forwarded
 190       // to itself, we are handling an evacuation failure and
 191       // we have already visited/tried to copy this object
 192       // there is no need to retry.
 193       if (!self_forwarded(obj)) {
 194         assert(_push_ref_cl != NULL, "should not be null");
 195         // Push the reference in the refs queue of the G1ParScanThreadState
 196         // instance for this worker thread.
 197         _push_ref_cl->do_oop(p);
 198       }
 199 
 200       // Deferred updates to the CSet are either discarded (in the normal case),


 160   // Do the safe subset of is_oop
 161   if (obj != NULL) {
 162 #ifdef CHECK_UNHANDLED_OOPS
 163     oopDesc* o = obj.obj();
 164 #else
 165     oopDesc* o = obj;
 166 #endif // CHECK_UNHANDLED_OOPS
 167     assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned");
 168     assert(Universe::heap()->is_in_reserved(obj), "must be in heap");
 169   }
 170 #endif // ASSERT
 171 
 172   assert(_from != NULL, "from region must be non-NULL");
 173   assert(_from->is_in_reserved(p), "p is not in from");
 174 
 175   HeapRegion* to = _g1->heap_region_containing(obj);
 176   if (to != NULL && _from != to) {
 177     // The _record_refs_into_cset flag is true during the RSet
 178     // updating part of an evacuation pause. It is false at all
 179     // other times:
 180     //  * rebuilding the remembered sets after a full GC
 181     //  * during concurrent refinement.
 182     //  * updating the remembered sets of regions in the collection
 183     //    set in the event of an evacuation failure (when deferred
 184     //    updates are enabled).
 185 
 186     if (_record_refs_into_cset && to->in_collection_set()) {
 187       // We are recording references that point into the collection
 188       // set and this particular reference does exactly that...
 189       // If the referenced object has already been forwarded
 190       // to itself, we are handling an evacuation failure and
 191       // we have already visited/tried to copy this object
 192       // there is no need to retry.
 193       if (!self_forwarded(obj)) {
 194         assert(_push_ref_cl != NULL, "should not be null");
 195         // Push the reference in the refs queue of the G1ParScanThreadState
 196         // instance for this worker thread.
 197         _push_ref_cl->do_oop(p);
 198       }
 199 
 200       // Deferred updates to the CSet are either discarded (in the normal case),
src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File