src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
changeset 58674 42a3a8941418
parent 58405 752bf4d5fbb7
child 58679 9c3209ff7550
child 58693 3f35a9efd7de
--- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp	Thu Oct 17 09:38:32 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp	Thu Oct 17 13:14:48 2019 -0400
@@ -268,17 +268,12 @@
   }
 
   ShenandoahMarkingContext* const marking_context = _heap->marking_context();
-
-  if (_heap->is_evacuation_in_progress()) {
-    // Normal GC
-    if (!marking_context->is_marked(obj)) {
+  if (_heap->is_evacuation_in_progress() && !marking_context->is_marked(obj)) {
+    Thread* thr = Thread::current();
+    if (thr->is_Java_thread()) {
       return NULL;
-    }
-  } else if (_heap->is_concurrent_traversal_in_progress()) {
-    // Traversal GC
-    if (marking_context->is_complete() &&
-        !marking_context->is_marked(resolve_forwarded_not_null(obj))) {
-      return NULL;
+    } else {
+      return obj;
     }
   }