Review request: 8024650: Don't adjust MaxMetaspaceSize up to MetaspaceSize

Bengt Rutisson bengt.rutisson at oracle.com
Fri Sep 13 01:58:37 PDT 2013


Hi Stefan,

On 9/12/13 5:18 PM, Stefan Karlsson wrote:
> http://cr.openjdk.java.net/~stefank/8024650/webrev.00/
>
> - Limit MetaspaceSize to MaxMetaspaceSize
> - Make sure we don't align down to 0.
> - jtreg test
>
> Note that this patch also adds/changes some functionality in the 
> OutputAnalyzer in test/testlibrary.
>
> thanks,
> StefanK

One minor thing is that I think we could remove this line in 
collectorPolicy.cpp:

   72   if (!FLAG_IS_DEFAULT(MaxMetaspaceSize)) {

Doing that will make sure that we always have MetaspaceSize <= 
MaxMetaspaceSize, which I think is the case already in the code, but 
this would make it clearer.


About the test. Instead of parsing the PrintFlagsFinal output you could 
use ManagementFactoryHelper.getDiagnosticMXBean().getVMOption(" 
MaxMetaspaceSize") etc. There are some other tests that to this. For 
example:

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/file/9561e0a8a2d6/test/gc/arguments/TestG1HeapRegionSize.java


A question about the new firstMatch() method in OutputAnalyzer. Is it 
more natural to first check stderr or stdout?

Thanks,
Bengt






More information about the hotspot-dev mailing list