[jdk11u-dev] RFR: 8306768: CodeCache Analytics reports wrong threshold

Anton Kozlov akozlov at openjdk.org
Wed Apr 26 12:21:22 UTC 2023


On Mon, 24 Apr 2023 17:19:30 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

> Jcmd CodeCache_Analytics uses own implementation of threshold calculation, allowing an error to creep in, making report invalid. The suggestion is to use the existing method for free ratio calculation. After the fix, the reported values become sane.
> 
> 
> java -XX:InitialCodeCacheSize=1G -XX:ReservedCodeCacheSize=1G ...
> 
> cmd 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':    -2037.994
> min. hotness =   1016
> avg. hotness =   2048
> --
> Threshold for method to be considered 'cold':    -2037.961
> min. hotness =   1016
> avg. hotness =   2048
> --
> Threshold for method to be considered 'cold':    -2031.906
> No hotness data available

Reopening with Backport NNN has worked. The backport needs minor adjustment: CodeCache::reverse_free_ratio needs code blob type in jdk11 (aligned with sweeper logic).

I assume previous review counts.

-------------

PR Comment: https://git.openjdk.org/jdk11u-dev/pull/1849#issuecomment-1523310034


More information about the jdk-updates-dev mailing list