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

Stefan Karlsson stefan.karlsson at oracle.com
Fri Sep 13 02:31:22 PDT 2013


On 09/13/2013 10:58 AM, Bengt Rutisson wrote:
>
> 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.

Will do.

>
>
> 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?

I'll try your approach and remove the firstMatch.

thanks,
StefanK

>
> Thanks,
> Bengt
>
>
>
>



More information about the hotspot-dev mailing list