JDK 22 |
---|
22 b20Fixed |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
We need to know arena usage for individual compilations to understand compiler footprint. The compiler can cause malloc spikes, that can cause lasting memory retention in the underlying libc. NMT is okay for initial triaging but no help when digging deeper into compiler footprint. NMT shows how much native memory the JIT uses but lumps together footprints from concurrent compilations, making its peak values arbitrary. And we have no way to associate the NMT numbers with individual allocations. This RFE is a proposal for a new statistic that reports memory usage per compilation. That will allow us to understand footprint issues and libc mem retention better and can be the first step in footprint reductions or, potentially, for adding a memory ceiling to C2. Examples: 1) Enable memory statistics globally ``` java ... -XX:CompileCommand=MemStat,*.* ``` 2) Enable memory statistics for j.l.String, print logs after each compilation and a final report at VM exit: ``` -XX:CompileCommand=MemStat,java.lang.String::*,print ```
|