< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp

Print this page
rev 53791 : 8203232: Shenandoah: Resolve oops in SATB filter


 299     // But if it happens to contain references to evacuated regions, those references would
 300     // not get updated for this stale copy during this cycle, and we will crash while scanning
 301     // it the next cycle.
 302     //
 303     // For GCLAB allocations, it is enough to rollback the allocation ptr. Either the next
 304     // object will overwrite this stale copy, or the filler object on LAB retirement will
 305     // do this. For non-GCLAB allocations, we have no way to retract the allocation, and
 306     // have to explicitly overwrite the copy with the filler object. With that overwrite,
 307     // we have to keep the fwdptr initialized and pointing to our (stale) copy.
 308     if (alloc_from_gclab) {
 309       ShenandoahThreadLocalData::gclab(thread)->undo_allocation(filler, size_with_fwdptr);
 310     } else {
 311       fill_with_object(copy, size_no_fwdptr);
 312     }
 313     shenandoah_assert_correct(NULL, copy_val);
 314     shenandoah_assert_correct(NULL, result);
 315     return result;
 316   }
 317 }
 318 

 319 inline bool ShenandoahHeap::requires_marking(const void* entry) const {
 320   return !_marking_context->is_marked(oop(entry));




 321 }
 322 
 323 template <class T>
 324 inline bool ShenandoahHeap::in_collection_set(T p) const {
 325   HeapWord* obj = (HeapWord*) p;
 326   assert(collection_set() != NULL, "Sanity");
 327   assert(is_in(obj), "should be in heap");
 328 
 329   return collection_set()->is_in(obj);
 330 }
 331 
 332 inline bool ShenandoahHeap::is_stable() const {
 333   return _gc_state.is_clear();
 334 }
 335 
 336 inline bool ShenandoahHeap::is_idle() const {
 337   return _gc_state.is_unset(MARKING | EVACUATION | UPDATEREFS | TRAVERSAL);
 338 }
 339 
 340 inline bool ShenandoahHeap::is_concurrent_mark_in_progress() const {




 299     // But if it happens to contain references to evacuated regions, those references would
 300     // not get updated for this stale copy during this cycle, and we will crash while scanning
 301     // it the next cycle.
 302     //
 303     // For GCLAB allocations, it is enough to rollback the allocation ptr. Either the next
 304     // object will overwrite this stale copy, or the filler object on LAB retirement will
 305     // do this. For non-GCLAB allocations, we have no way to retract the allocation, and
 306     // have to explicitly overwrite the copy with the filler object. With that overwrite,
 307     // we have to keep the fwdptr initialized and pointing to our (stale) copy.
 308     if (alloc_from_gclab) {
 309       ShenandoahThreadLocalData::gclab(thread)->undo_allocation(filler, size_with_fwdptr);
 310     } else {
 311       fill_with_object(copy, size_no_fwdptr);
 312     }
 313     shenandoah_assert_correct(NULL, copy_val);
 314     shenandoah_assert_correct(NULL, result);
 315     return result;
 316   }
 317 }
 318 
 319 template<bool RESOLVE>
 320 inline bool ShenandoahHeap::requires_marking(const void* entry) const {
 321   oop obj = oop(entry);
 322   if (RESOLVE) {
 323     obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
 324   }
 325   return !_marking_context->is_marked(obj);
 326 }
 327 
 328 template <class T>
 329 inline bool ShenandoahHeap::in_collection_set(T p) const {
 330   HeapWord* obj = (HeapWord*) p;
 331   assert(collection_set() != NULL, "Sanity");
 332   assert(is_in(obj), "should be in heap");
 333 
 334   return collection_set()->is_in(obj);
 335 }
 336 
 337 inline bool ShenandoahHeap::is_stable() const {
 338   return _gc_state.is_clear();
 339 }
 340 
 341 inline bool ShenandoahHeap::is_idle() const {
 342   return _gc_state.is_unset(MARKING | EVACUATION | UPDATEREFS | TRAVERSAL);
 343 }
 344 
 345 inline bool ShenandoahHeap::is_concurrent_mark_in_progress() const {


< prev index next >