Bug: ZGC does not support NMT
Per Liden
per.liden at oracle.com
Mon Dec 11 09:39:47 UTC 2017
We haven't added support for that yet. ZGC is not using the normal
os::reserve/commit_memory paths for the heap memory so we don't get that
"for free", as other GCs do.
/Per
On 2017-12-11 10:00, Aleksey Shipilev wrote:
> Trying to run ZGC with NMT support, and there is no "Java Heap" section. I guess mtJavaHeap tag is
> missing in heap allocation code within ZGC.
>
> $ java -XX:+UseZGC -Xms8g -Xmx8g -XX:NativeMemoryTracking=summary Hello
>
> $ jcmd 57529 VM.native_memory
>
> Total: reserved=310485KB, committed=66769KB
> - Class (reserved=8303KB, committed=4463KB)
> (classes #461)
> (malloc=111KB #603)
> (mmap: reserved=8192KB, committed=4352KB)
> ( Metadata: )
> ( reserved=8192KB, committed=4352KB)
> ( used=3703KB)
> ( free=649KB)
> ( waste=0KB =0.00%)
>
> - Thread (reserved=34978KB, committed=34978KB)
> (thread #35)
> (stack: reserved=34892KB, committed=34892KB)
> (malloc=47KB #187)
> (arena=40KB #56)
>
> - Code (reserved=247726KB, committed=7850KB)
> (malloc=42KB #474)
> (mmap: reserved=247684KB, committed=7808KB)
>
> - GC (reserved=16921KB, committed=16921KB)
> (malloc=537KB #51)
> (mmap: reserved=16384KB, committed=16384KB)
>
> - Compiler (reserved=149KB, committed=149KB)
> (malloc=18KB #53)
> (arena=131KB #15)
>
> - Internal (reserved=317KB, committed=317KB)
> (malloc=285KB #1058)
> (mmap: reserved=32KB, committed=32KB)
>
> - Symbol (reserved=1727KB, committed=1727KB)
> (malloc=1111KB #1051)
> (arena=616KB #1)
>
> - Native Memory Tracking (reserved=89KB, committed=89KB)
> (malloc=5KB #56)
> (tracking overhead=84KB)
>
> - Arena Chunk (reserved=185KB, committed=185KB)
> (malloc=185KB)
>
> - Logging (reserved=8KB, committed=8KB)
> (malloc=8KB #158)
>
> - Arguments (reserved=17KB, committed=17KB)
> (malloc=17KB #463)
>
> - Module (reserved=57KB, committed=57KB)
> (malloc=57KB #1129)
>
> - Unknown (reserved=8KB, committed=8KB)
> (mmap: reserved=8KB, committed=8KB)
>
> Thanks,
> -Aleksey
>
More information about the zgc-dev
mailing list