src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
changeset 58674 42a3a8941418
parent 58405 752bf4d5fbb7
child 58679 9c3209ff7550
child 58693 3f35a9efd7de
equal deleted inserted replaced
58673:06cc25fe0ca3 58674:42a3a8941418
   266   if (CompressedOops::is_null(obj)) {
   266   if (CompressedOops::is_null(obj)) {
   267     return NULL;
   267     return NULL;
   268   }
   268   }
   269 
   269 
   270   ShenandoahMarkingContext* const marking_context = _heap->marking_context();
   270   ShenandoahMarkingContext* const marking_context = _heap->marking_context();
   271 
   271   if (_heap->is_evacuation_in_progress() && !marking_context->is_marked(obj)) {
   272   if (_heap->is_evacuation_in_progress()) {
   272     Thread* thr = Thread::current();
   273     // Normal GC
   273     if (thr->is_Java_thread()) {
   274     if (!marking_context->is_marked(obj)) {
       
   275       return NULL;
   274       return NULL;
   276     }
   275     } else {
   277   } else if (_heap->is_concurrent_traversal_in_progress()) {
   276       return obj;
   278     // Traversal GC
       
   279     if (marking_context->is_complete() &&
       
   280         !marking_context->is_marked(resolve_forwarded_not_null(obj))) {
       
   281       return NULL;
       
   282     }
   277     }
   283   }
   278   }
   284 
   279 
   285   return load_reference_barrier_not_null(obj);
   280   return load_reference_barrier_not_null(obj);
   286 }
   281 }