< prev index next >

src/hotspot/share/code/nmethod.cpp


*** 1571,1587 **** bool state_is_unloading = IsUnloadingState::is_unloading(state); uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state); if (state_is_unloading) { return true; } ! if (state_unloading_cycle == CodeCache::unloading_cycle()) { return false; } // The IsUnloadingBehaviour is responsible for checking if there are any dead // oops in the CompiledMethod, by calling oops_do on it. ! state_unloading_cycle = CodeCache::unloading_cycle(); if (is_zombie()) { // Zombies without calculated unloading epoch are never unloading due to GC. state_is_unloading = false; } else { --- 1571,1588 ---- bool state_is_unloading = IsUnloadingState::is_unloading(state); uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state); if (state_is_unloading) { return true; } ! uint8_t current_cycle = CodeCache::unloading_cycle(); ! if (state_unloading_cycle == current_cycle) { return false; } // The IsUnloadingBehaviour is responsible for checking if there are any dead // oops in the CompiledMethod, by calling oops_do on it. ! state_unloading_cycle = current_cycle; if (is_zombie()) { // Zombies without calculated unloading epoch are never unloading due to GC. state_is_unloading = false; } else {
< prev index next >