RFR: 8025313: MetaspaceMemoryPool incorrectly reports undefined size for max

Stefan Karlsson stefan.karlsson at oracle.com
Mon Sep 30 15:28:12 UTC 2013


On 2013-09-30 17:20, Erik Helin wrote:
> Hi all,
>
> this patch fixes an issue where the metaspace memory pool reports -1 for
> MemoryPoolMXBean.getUsage().getMax(), even though the user has set
> MaxMetaspaceSize on the command line.
>
> The problem is that we in collectorPolicy.cpp use FLAG_SET_ERGO when
> aligning MaxMetaspaceSize while at the same time relying on
> FLAG_IS_CMDLINE in memoryPool.cpp when deciding what to return for
> MetaspacePool::calculate_max_size.
>
> This patch removes FLAG_SET_ERGO and instead simply sets
> MaxMetaspaceSize.
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8025313/webrev.00/

Could you also change the setting of MetaspaceSize, so that both flags 
are set the same way?

Otherwise, this looks good.

thanks,
StefanK


>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8025313
>
> Thanks,
> Erik




More information about the hotspot-gc-dev mailing list