< prev index next >

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

Print this page
*** 124,17 ***
    ShenandoahNMethod* data = gc_data(nm);
    assert(data != nullptr, "Sanity");
    assert(data->lock()->owned_by_self(), "Must hold the lock");
  
    ShenandoahHeap* const heap = ShenandoahHeap::heap();
!   if (heap->is_concurrent_mark_in_progress()) {
!     ShenandoahKeepAliveClosure cl;
-     data->oops_do(&cl);
-   } else if (heap->is_concurrent_weak_root_in_progress() ||
-              heap->is_concurrent_strong_root_in_progress() ) {
      ShenandoahEvacOOMScope evac_scope;
      heal_nmethod_metadata(data);
    } else {
      // There is possibility that GC is cancelled when it arrives final mark.
      // In this case, concurrent root phase is skipped and degenerated GC should be
      // followed, where nmethods are disarmed.
    }
--- 124,17 ---
    ShenandoahNMethod* data = gc_data(nm);
    assert(data != nullptr, "Sanity");
    assert(data->lock()->owned_by_self(), "Must hold the lock");
  
    ShenandoahHeap* const heap = ShenandoahHeap::heap();
!   if (heap->is_concurrent_weak_root_in_progress() ||
!       heap->is_concurrent_strong_root_in_progress()) {
      ShenandoahEvacOOMScope evac_scope;
      heal_nmethod_metadata(data);
+   } else if (heap->is_concurrent_mark_in_progress()) {
+     ShenandoahKeepAliveClosure cl;
+     data->oops_do(&cl);
    } else {
      // There is possibility that GC is cancelled when it arrives final mark.
      // In this case, concurrent root phase is skipped and degenerated GC should be
      // followed, where nmethods are disarmed.
    }
< prev index next >