8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize

Estimate the minimum required size for the misc code region and check if the specified misc code region size meets the minimum size requirement

Reviewed-by: jiangli, dholmes
This commit is contained in:
Calvin Cheung 2014-10-23 10:08:02 -07:00
parent 397e42b775
commit 1aa3da1067
5 changed files with 33 additions and 12 deletions

View file

@ -256,16 +256,18 @@ void report_out_of_shared_space(SharedSpaceType shared_space) {
static const char* name[] = {
"shared read only space",
"shared read write space",
"shared miscellaneous data space"
"shared miscellaneous data space",
"shared miscellaneous code space"
};
static const char* flag[] = {
"SharedReadOnlySize",
"SharedReadWriteSize",
"SharedMiscDataSize"
"SharedMiscDataSize",
"SharedMiscCodeSize"
};
warning("\nThe %s is not large enough\n"
"to preload requested classes. Use -XX:%s=\n"
"to preload requested classes. Use -XX:%s=<size>\n"
"to increase the initial size of %s.\n",
name[shared_space], flag[shared_space], name[shared_space]);
exit(2);