Skip to content

Commit 7835cdb

Browse files
miao-zhengJohn Jiang
authored andcommitted
8265915: adjust state_unloading_cycle compuation order in nmethod::is_unloading
Reviewed-by: thartmann
1 parent 20ad428 commit 7835cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/code/nmethod.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,10 +1757,10 @@ class IsUnloadingState: public AllStatic {
17571757
bool nmethod::is_unloading() {
17581758
uint8_t state = RawAccess<MO_RELAXED>::load(&_is_unloading_state);
17591759
bool state_is_unloading = IsUnloadingState::is_unloading(state);
1760-
uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state);
17611760
if (state_is_unloading) {
17621761
return true;
17631762
}
1763+
uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state);
17641764
uint8_t current_cycle = CodeCache::unloading_cycle();
17651765
if (state_unloading_cycle == current_cycle) {
17661766
return false;

0 commit comments

Comments
 (0)