src/hotspot/share/gc/z/zBarrierSetNMethod.cpp
changeset 53282 cb7fff9105a8
parent 52939 9a8585f60c32
child 53894 bf1133e7dfba
equal deleted inserted replaced
53281:672b629e1f72 53282:cb7fff9105a8
    40     // and disarmed the nmethod.
    40     // and disarmed the nmethod.
    41     return true;
    41     return true;
    42   }
    42   }
    43 
    43 
    44   if (nm->is_unloading()) {
    44   if (nm->is_unloading()) {
       
    45     // We don't need to take the lock when unlinking nmethods from
       
    46     // the Method, because it is only concurrently unlinked by
       
    47     // the entry barrier, which acquires the per nmethod lock.
       
    48     nm->unlink_from_method(false /* acquire_lock */);
       
    49 
    45     // We can end up calling nmethods that are unloading
    50     // We can end up calling nmethods that are unloading
    46     // since we clear compiled ICs lazily. Returning false
    51     // since we clear compiled ICs lazily. Returning false
    47     // will re-resovle the call and update the compiled IC.
    52     // will re-resovle the call and update the compiled IC.
    48     return false;
    53     return false;
    49   }
    54   }