< prev index next >

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

Print this page
rev 8069 : imported patch g1_cleanup


 155 }
 156 
 157 template <class T>
 158 inline void G1UpdateRSOrPushRefOopClosure::do_oop_nv(T* p) {
 159   oop obj = oopDesc::load_decode_heap_oop(p);
 160   if (obj == NULL) {
 161     return;
 162   }
 163 
 164 #ifdef ASSERT
 165   // can't do because of races
 166   // assert(obj == NULL || obj->is_oop(), "expected an oop");
 167 
 168   // Do the safe subset of is_oop
 169 #ifdef CHECK_UNHANDLED_OOPS
 170   oopDesc* o = obj.obj();
 171 #else
 172   oopDesc* o = obj;
 173 #endif // CHECK_UNHANDLED_OOPS
 174   assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned");
 175   assert(Universe::heap()->is_in_reserved(obj), "must be in heap");
 176 #endif // ASSERT
 177 
 178   assert(_from != NULL, "from region must be non-NULL");
 179   assert(_from->is_in_reserved(p), "p is not in from");
 180 
 181   HeapRegion* to = _g1->heap_region_containing(obj);
 182   if (_from == to) {
 183     // Normally this closure should only be called with cross-region references.
 184     // But since Java threads are manipulating the references concurrently and we
 185     // reload the values things may have changed.
 186     return;
 187   }
 188 
 189   // The _record_refs_into_cset flag is true during the RSet
 190   // updating part of an evacuation pause. It is false at all
 191   // other times:
 192   //  * rebuilding the remembered sets after a full GC
 193   //  * during concurrent refinement.
 194   //  * updating the remembered sets of regions in the collection
 195   //    set in the event of an evacuation failure (when deferred




 155 }
 156 
 157 template <class T>
 158 inline void G1UpdateRSOrPushRefOopClosure::do_oop_nv(T* p) {
 159   oop obj = oopDesc::load_decode_heap_oop(p);
 160   if (obj == NULL) {
 161     return;
 162   }
 163 
 164 #ifdef ASSERT
 165   // can't do because of races
 166   // assert(obj == NULL || obj->is_oop(), "expected an oop");
 167 
 168   // Do the safe subset of is_oop
 169 #ifdef CHECK_UNHANDLED_OOPS
 170   oopDesc* o = obj.obj();
 171 #else
 172   oopDesc* o = obj;
 173 #endif // CHECK_UNHANDLED_OOPS
 174   assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned");
 175   assert(_g1->is_in_reserved(obj), "must be in heap");
 176 #endif // ASSERT
 177 
 178   assert(_from != NULL, "from region must be non-NULL");
 179   assert(_from->is_in_reserved(p), "p is not in from");
 180 
 181   HeapRegion* to = _g1->heap_region_containing(obj);
 182   if (_from == to) {
 183     // Normally this closure should only be called with cross-region references.
 184     // But since Java threads are manipulating the references concurrently and we
 185     // reload the values things may have changed.
 186     return;
 187   }
 188 
 189   // The _record_refs_into_cset flag is true during the RSet
 190   // updating part of an evacuation pause. It is false at all
 191   // other times:
 192   //  * rebuilding the remembered sets after a full GC
 193   //  * during concurrent refinement.
 194   //  * updating the remembered sets of regions in the collection
 195   //    set in the event of an evacuation failure (when deferred


< prev index next >