src/hotspot/share/c1/c1_Runtime1.cpp
changeset 47624 b055cb5170f5
parent 47216 71c04702a3d5
child 47658 c2b7fb8e5144
equal deleted inserted replaced
47623:0a5f1b851890 47624:b055cb5170f5
  1219   // is on the right list.
  1219   // is on the right list.
  1220   if (ScavengeRootsInCode) {
  1220   if (ScavengeRootsInCode) {
  1221     MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag);
  1221     MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag);
  1222     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
  1222     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
  1223     guarantee(nm != NULL, "only nmethods can contain non-perm oops");
  1223     guarantee(nm != NULL, "only nmethods can contain non-perm oops");
  1224     if (!nm->on_scavenge_root_list() &&
       
  1225         ((mirror.not_null() && mirror()->is_scavengable()) ||
       
  1226          (appendix.not_null() && appendix->is_scavengable()))) {
       
  1227       CodeCache::add_scavenge_root_nmethod(nm);
       
  1228     }
       
  1229 
  1224 
  1230     // Since we've patched some oops in the nmethod,
  1225     // Since we've patched some oops in the nmethod,
  1231     // (re)register it with the heap.
  1226     // (re)register it with the heap.
  1232     Universe::heap()->register_nmethod(nm);
  1227     Universe::heap()->register_nmethod(nm);
  1233   }
  1228   }