-
Bug
-
Resolution: Fixed
-
P5
-
11, 17, 19
-
b01
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8307003 | 17.0.9-oracle | Tobias Hartmann | P5 | Resolved | Fixed | b01 |
JDK-8307061 | 11.0.21-oracle | Tobias Hartmann | P5 | Resolved | Fixed | b01 |
JDK-8307001 | 11.0.20 | Anton Kozlov | P5 | Resolved | Fixed | b01 |
Jcmd CodeCache_Analytics uses own implementation of threshold calculation, allowing an error to creep in, making report invalid. Instead of unallocated size, it uses uncommitted size. The problem especially visialbe with InitialCodeCacheSize == ReservedCodeCacheSize.
https://github.com/openjdk/jdk17u-dev/blob/f969f811a71603f39e4ab42f1362271b7a4d303d/src/hotspot/share/code/codeCache.cpp#L926
{code}
java -XX:InitialCodeCacheSize=1G -XX:ReservedCodeCacheSize=1G Sleep.java
jcmd jdk.compiler/com.sun.tools.javac.launcher.Main Compiler.CodeHeap_Analytics | grep -A 2 "Threshold for method to be considered 'cold'"
Threshold for method to be considered 'cold': 5330737152.000
min. hotness = 1016
avg. hotness = 2048
--
Threshold for method to be considered 'cold': 5330696192.000
min. hotness = 1016
avg. hotness = 2048
--
Threshold for method to be considered 'cold': 75978752.000
No hotness data available
{code}
- backported by
-
JDK-8307001 CodeCache Analytics reports wrong threshold
- Resolved
-
JDK-8307003 CodeCache Analytics reports wrong threshold
- Resolved
-
JDK-8307061 CodeCache Analytics reports wrong threshold
- Resolved
- relates to
-
JDK-8198691 CodeHeap State Analytics
- Resolved
-
JDK-8290025 Remove the Sweeper
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/42ae833f
-
Commit openjdk/jdk17u-dev/243e6430
-
Review openjdk/jdk11u-dev/1849
-
Review openjdk/jdk17u-dev/1295