< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp

Print this page




 117   }
 118 }
 119 
 120 oop ShenandoahBarrierSet::load_reference_barrier(oop obj) {
 121   if (obj != NULL) {
 122     return load_reference_barrier_not_null(obj);
 123   } else {
 124     return obj;
 125   }
 126 }
 127 
 128 oop ShenandoahBarrierSet::load_reference_barrier_impl(oop obj) {
 129   assert(ShenandoahLoadRefBarrier, "should be enabled");
 130   if (!CompressedOops::is_null(obj)) {
 131     bool evac_in_progress = _heap->is_evacuation_in_progress();
 132     oop fwd = resolve_forwarded_not_null(obj);
 133     if (evac_in_progress &&
 134         _heap->in_collection_set(obj) &&
 135         obj == fwd) {
 136       Thread *t = Thread::current();
 137       ShenandoahEvacOOMScope oom_evac_scope(t);
 138       return _heap->evacuate_object(obj, t);
 139     } else {
 140       return fwd;
 141     }
 142   } else {
 143     return obj;
 144   }
 145 }
 146 
 147 void ShenandoahBarrierSet::on_thread_create(Thread* thread) {
 148   // Create thread local data
 149   ShenandoahThreadLocalData::create(thread);
 150 }
 151 
 152 void ShenandoahBarrierSet::on_thread_destroy(Thread* thread) {
 153   // Destroy thread local data
 154   ShenandoahThreadLocalData::destroy(thread);
 155 }
 156 
 157 void ShenandoahBarrierSet::on_thread_attach(Thread *thread) {




 117   }
 118 }
 119 
 120 oop ShenandoahBarrierSet::load_reference_barrier(oop obj) {
 121   if (obj != NULL) {
 122     return load_reference_barrier_not_null(obj);
 123   } else {
 124     return obj;
 125   }
 126 }
 127 
 128 oop ShenandoahBarrierSet::load_reference_barrier_impl(oop obj) {
 129   assert(ShenandoahLoadRefBarrier, "should be enabled");
 130   if (!CompressedOops::is_null(obj)) {
 131     bool evac_in_progress = _heap->is_evacuation_in_progress();
 132     oop fwd = resolve_forwarded_not_null(obj);
 133     if (evac_in_progress &&
 134         _heap->in_collection_set(obj) &&
 135         obj == fwd) {
 136       Thread *t = Thread::current();

 137       return _heap->evacuate_object(obj, t);
 138     } else {
 139       return fwd;
 140     }
 141   } else {
 142     return obj;
 143   }
 144 }
 145 
 146 void ShenandoahBarrierSet::on_thread_create(Thread* thread) {
 147   // Create thread local data
 148   ShenandoahThreadLocalData::create(thread);
 149 }
 150 
 151 void ShenandoahBarrierSet::on_thread_destroy(Thread* thread) {
 152   // Destroy thread local data
 153   ShenandoahThreadLocalData::destroy(thread);
 154 }
 155 
 156 void ShenandoahBarrierSet::on_thread_attach(Thread *thread) {


< prev index next >