< prev index next >

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

Print this page
@@ -153,17 +153,17 @@
    ShenandoahNMethod* data = gc_data(nm);
    assert(data != NULL, "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()) {
+   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.
      assert(heap->cancelled_gc(), "What else?");
< prev index next >