< prev index next >

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

Print this page

 87   assert(_heap->is_evacuation_in_progress(), "only during evacuation");
 88   if (need_bulk_update(cast_from_oop<HeapWord*>(obj))) {
 89     ShenandoahEvacOOMScope oom_evac_scope;
 90     ShenandoahUpdateRefsForOopClosure</* has_fwd = */ true, /* evac = */ true, /* enqueue */ false> cl;
 91     obj->oop_iterate(&cl);
 92   }
 93 }
 94 
 95 void ShenandoahBarrierSet::clone_update(oop obj) {
 96   assert(_heap->is_update_refs_in_progress(), "only during update-refs");
 97   if (need_bulk_update(cast_from_oop<HeapWord*>(obj))) {
 98     ShenandoahUpdateRefsForOopClosure</* has_fwd = */ true, /* evac = */ false, /* enqueue */ false> cl;
 99     obj->oop_iterate(&cl);
100   }
101 }
102 
103 void ShenandoahBarrierSet::clone_barrier(oop obj) {
104   assert(ShenandoahCloneBarrier, "only get here with clone barriers enabled");
105   shenandoah_assert_correct(nullptr, obj);
106 




107   int gc_state = _heap->gc_state();
108   if ((gc_state & ShenandoahHeap::MARKING) != 0) {
109     clone_marking(obj);
110   } else if ((gc_state & ShenandoahHeap::EVACUATION) != 0) {
111     clone_evacuation(obj);
112   } else {
113     clone_update(obj);
114   }
115 }
116 
117 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHBARRIERSETCLONE_INLINE_HPP

 87   assert(_heap->is_evacuation_in_progress(), "only during evacuation");
 88   if (need_bulk_update(cast_from_oop<HeapWord*>(obj))) {
 89     ShenandoahEvacOOMScope oom_evac_scope;
 90     ShenandoahUpdateRefsForOopClosure</* has_fwd = */ true, /* evac = */ true, /* enqueue */ false> cl;
 91     obj->oop_iterate(&cl);
 92   }
 93 }
 94 
 95 void ShenandoahBarrierSet::clone_update(oop obj) {
 96   assert(_heap->is_update_refs_in_progress(), "only during update-refs");
 97   if (need_bulk_update(cast_from_oop<HeapWord*>(obj))) {
 98     ShenandoahUpdateRefsForOopClosure</* has_fwd = */ true, /* evac = */ false, /* enqueue */ false> cl;
 99     obj->oop_iterate(&cl);
100   }
101 }
102 
103 void ShenandoahBarrierSet::clone_barrier(oop obj) {
104   assert(ShenandoahCloneBarrier, "only get here with clone barriers enabled");
105   shenandoah_assert_correct(nullptr, obj);
106 
107   // We only need to handle YOUNG_MARKING here because the clone barrier
108   // is only invoked during marking if Shenandoah is in incremental update
109   // mode. OLD_MARKING should only happen when Shenandoah is in generational
110   // mode, which uses the SATB write barrier.
111   int gc_state = _heap->gc_state();
112   if ((gc_state & ShenandoahHeap::YOUNG_MARKING) != 0) {
113     clone_marking(obj);
114   } else if ((gc_state & ShenandoahHeap::EVACUATION) != 0) {
115     clone_evacuation(obj);
116   } else {
117     clone_update(obj);
118   }
119 }
120 
121 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHBARRIERSETCLONE_INLINE_HPP
< prev index next >