RFR: Add NMT support for Java heap

Aleksey Shipilev shade at redhat.com
Tue Dec 12 10:50:09 UTC 2017


On 12/12/2017 11:42 AM, Per Liden wrote:
> As Aleksey noticed, we don't register the Java heap with the native memory tracker. Here's a patch
> to do that.
> 
> http://cr.openjdk.java.net/~pliden/zgc/nmt_java_heap/webrev.0/

Patch looks good, but the NMT "reserved" data is off the charts:

Total: reserved=17180280855KB, committed=17143487KB
-                 Java Heap (reserved=17179869184KB, committed=16777216KB)
                            (mmap: reserved=17179869184KB, committed=16777216KB)

I guess this should not pass ZAddressSpaceSize, and instead tell the reserved space of the first
mapping?

+  // Register address space with native memory tracker
+  nmt_reserve(ZAddressSpaceStart, ZAddressSpaceSize);

Thanks,
-Aleksey



More information about the zgc-dev mailing list