< prev index next > src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp
Print this page
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() ) {
+ 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 >