-
Bug
-
Resolution: Fixed
-
P3
-
hs25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8030718 | 9 | Albert Noll | P3 | Resolved | Fixed | b02 |
JDK-8045175 | 8u25 | Albert Noll | P3 | Resolved | Fixed | b01 |
JDK-8053181 | emb-8u26 | Albert Noll | P3 | Resolved | Fixed | b17 |
The calculation of wait_until_next_sweep in NMethodSweeper::possibly_sweep() {} has a signed to unsigned conversion bug. The calculation was done as follows:
double wait_until_next_sweep = (ReservedCodeCacheSize / (16 * M)) - time_since_last_sweep - CodeCache::reverse_free_ratio();
Since the type of ReservedCodeCacheSize (uintx) has a higher rank than time_since_last_sleep (int) and time_since_last_sweep can be larger than (ReservedCodeCacheSize / (16 * M)) there is an underflow. Consequently, wait_until_next_sweep is assigned a high value, which disables the intended periodic code cache sweeps. The current version will run the sweeper only if the code cache is full or the accumulated size of all nmethods that changed
their state size the last sweep is larger than 1% of the ReservedCodeCacheSize.
double wait_until_next_sweep = (ReservedCodeCacheSize / (16 * M)) - time_since_last_sweep - CodeCache::reverse_free_ratio();
Since the type of ReservedCodeCacheSize (uintx) has a higher rank than time_since_last_sleep (int) and time_since_last_sweep can be larger than (ReservedCodeCacheSize / (16 * M)) there is an underflow. Consequently, wait_until_next_sweep is assigned a high value, which disables the intended periodic code cache sweeps. The current version will run the sweeper only if the code cache is full or the accumulated size of all nmethods that changed
their state size the last sweep is larger than 1% of the ReservedCodeCacheSize.
- backported by
-
JDK-8030718 Bug in calculation of code cache sweeping interval
- Resolved
-
JDK-8045175 Bug in calculation of code cache sweeping interval
- Resolved
-
JDK-8053181 Bug in calculation of code cache sweeping interval
- Resolved