RFR(S): 8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
Jiangli Zhou
jiangli.zhou at oracle.com
Tue Oct 21 23:00:51 UTC 2014
Hi Calvin,
Looks good. Could you please add comments for the size check in
metaspace.cpp explaining the minimum misc code size estimate is based on
MetaspaceShared::generate_vtable_methods().
Thanks,
Jiangli
On 10/21/2014 03:42 PM, Calvin Cheung wrote:
> 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=
> to increase the initial size of shared miscellaneous code space.
>
> webrev: http://cr.openjdk.java.net/~ccheung/8038268/jdk9/webrev/
>
> Test:
> JPRT
> jtreg on the affected test on linux_x64 and windows_x64.
>
> thanks,
> Calvin
More information about the hotspot-runtime-dev
mailing list