Skip to content
Permalink
Browse files
8265915: adjust state_unloading_cycle compuation order in nmethod::is…
…_unloading

Reviewed-by: thartmann
  • Loading branch information
miao-zheng authored and John Jiang committed May 6, 2021
1 parent 20ad428 commit 7835cdbef4992bca3227a001bc58aa56dd72c3a5
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/code/nmethod.cpp
@@ -1757,10 +1757,10 @@ class IsUnloadingState: public AllStatic {
bool nmethod::is_unloading() {
uint8_t state = RawAccess<MO_RELAXED>::load(&_is_unloading_state);
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 state_unloading_cycle = IsUnloadingState::unloading_cycle(state);
uint8_t current_cycle = CodeCache::unloading_cycle();
if (state_unloading_cycle == current_cycle) {
return false;

0 comments on commit 7835cdb

Please sign in to comment.