src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp
changeset 55562 2f464d628942
parent 55089 934d68e9c45d
child 57652 758da77e4cd2
equal deleted inserted replaced
55561:4c0a7916d3cd 55562:2f464d628942
   168     case 2: {
   168     case 2: {
   169       assert_locked_or_safepoint(CodeCache_lock);
   169       assert_locked_or_safepoint(CodeCache_lock);
   170       ShenandoahLocker locker(CodeCache_lock->owned_by_self() ? NULL : &_recorded_nms_lock);
   170       ShenandoahLocker locker(CodeCache_lock->owned_by_self() ? NULL : &_recorded_nms_lock);
   171 
   171 
   172       ShenandoahNMethodOopDetector detector;
   172       ShenandoahNMethodOopDetector detector;
   173       nm->oops_do(&detector, /* allow_zombie = */ true);
   173       nm->oops_do(&detector, /* allow_dead = */ true);
   174 
   174 
   175       if (detector.has_oops()) {
   175       if (detector.has_oops()) {
   176         int idx = _recorded_nms->find(nm, ShenandoahNMethod::find_with_nmethod);
   176         int idx = _recorded_nms->find(nm, ShenandoahNMethod::find_with_nmethod);
   177         assert(idx != -1, "nmethod " PTR_FORMAT " should be registered", p2i(nm));
   177         assert(idx != -1, "nmethod " PTR_FORMAT " should be registered", p2i(nm));
   178         ShenandoahNMethod* old = _recorded_nms->at(idx);
   178         ShenandoahNMethod* old = _recorded_nms->at(idx);