mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8227755: Need more than 2 distinct CodeCache unloading cycles
Reviewed-by: eosterlund, rkennke
This commit is contained in:
parent
7b176df9c9
commit
1a115f9763
1 changed files with 4 additions and 3 deletions
|
@ -771,9 +771,10 @@ void CodeCache::purge_exception_caches() {
|
|||
uint8_t CodeCache::_unloading_cycle = 1;
|
||||
|
||||
void CodeCache::increment_unloading_cycle() {
|
||||
if (_unloading_cycle == 1) {
|
||||
_unloading_cycle = 2;
|
||||
} else {
|
||||
// 2-bit value (see IsUnloadingState in nmethod.cpp for details)
|
||||
// 0 is reserved for new methods.
|
||||
_unloading_cycle = (_unloading_cycle + 1) % 4;
|
||||
if (_unloading_cycle == 0) {
|
||||
_unloading_cycle = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue