RFR: 8000754: NPG: Implement a MemoryPool MXBean for Metaspace

Stefan Karlsson stefan.karlsson at oracle.com
Wed Feb 20 12:42:40 UTC 2013


Hi Erik,

This fix seems reasonable to me.

http://cr.openjdk.java.net/~ehelin/8000754/webrev.01/src/share/vm/services/memoryPool.cpp.udiff.html

+MemoryUsage MetaspacePoolBase::get_memory_usage() {
+  size_t used = MetaspaceAux::used_in_bytes(_md_type);
+  size_t committed = MetaspaceAux::capacity_in_bytes(_md_type);
+  return MemoryUsage(initial_size(), used, committed, max_size());
+}

I'm not sure if capacity is the right value to use for committed, so 
you'll need to verify that with Jon.

thanks,
StefanK

On 02/20/2013 12:02 PM, Erik Helin wrote:
> Hi,
>
> this change implements a new MemoryManagerMXBean, MetaspaceManager, as
> well as two new MemoryPoolMXBeans: Metaspace and Class Metaspace. I have
> also written a tests that tests the new beans.
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8000754/webrev.01/
>
> Bug:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8000754
>
> Testing:
> JPRT
> New jtreg test
>
> Thanks,
> Erik




More information about the hotspot-gc-dev mailing list