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

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

Hi Stefan,

On 9/12/13 5:18 PM, Stefan Karlsson wrote:
> - 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 

   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 

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


More information about the hotspot-dev mailing list