RFR(S): 8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize

Calvin Cheung calvin.cheung at oracle.com
Thu Oct 23 00:07:54 UTC 2014


Hi David,

Thanks for your review.

On 10/22/2014 4:31 PM, David Holmes wrote:
> Hi Calvin,
>
>> JBS:https://bugs.openjdk.java.net/browse/JDK-8038268
>>
>> The fix is to estimate the minimum required size for the misc code
>> region based on the instructions in the x64 version of
>> MetaspaceShared::generate_vtable_methods(). If the user's specified misc
>> code size is less than the minimum required size, the vm will issue an
>> error message instead of crashing.
>>
>> With the fix, the error message will be:
>> ./bin/java -XX:+UnlockDiagnosticVMOptions
>> -XX:SharedArchiveFile=./test.jsa -XX:SharedMiscCodeSize=32k -Xshare:dump
>> Java HotSpot(TM) 64-Bit Server VM warning:
>> The shared miscellaneous code space is not large enough
>> to preload requested classes. Use -XX:SharedMiscCodeSize=
>
> The message (not defined in this change I know) would be better 
> expressed as:
>
> Use -XX:SharedMiscCodeSize=<size>
I'll fix it for other cases too since it's part of the same warning 
string for other cases.
>
>> to increase the initial size of shared miscellaneous code space.
>>
>> webrev:http://cr.openjdk.java.net/~ccheung/8038268/jdk9/webrev/
>
> src/share/vm/memory/metaspaceShared.hpp
>
> +     vtbl_common_code_size  = (1*K) // consevative size ...
>
> Typo: consevative/conservative
>
> In the test can you add:
>
> @build com.oracle.java.testlibrary.*
I'll fix the above.

thanks,
Calvin
>
>
> Reviewed.
>
> Thanks,
> David
>
>> Test:
>>      JPRT
>>      jtreg on the affected test on linux_x64 and windows_x64.
>>
>> thanks,
>> Calvin
>>



More information about the hotspot-runtime-dev mailing list