mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8072061: Automatically determine optimal sizes for the CDS regions
See new C++ class MetaspaceClosure. Reviewed-by: coleenp, jiangli, mseledtsov
This commit is contained in:
parent
4b983a51fd
commit
f7f193ae71
82 changed files with 2010 additions and 1622 deletions
|
@ -275,42 +275,6 @@ void report_untested(const char* file, int line, const char* message) {
|
|||
#endif // !PRODUCT
|
||||
}
|
||||
|
||||
void report_out_of_shared_space(SharedSpaceType shared_space) {
|
||||
if (shared_space == SharedOptional) {
|
||||
// The estimated shared_optional_space size is large enough
|
||||
// for all class bytes. It should not run out of space.
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
static const char* name[] = {
|
||||
"shared read only space",
|
||||
"shared read write space",
|
||||
"shared miscellaneous data space",
|
||||
"shared miscellaneous code space"
|
||||
};
|
||||
static const char* flag[] = {
|
||||
"SharedReadOnlySize",
|
||||
"SharedReadWriteSize",
|
||||
"SharedMiscDataSize",
|
||||
"SharedMiscCodeSize"
|
||||
};
|
||||
|
||||
warning("\nThe %s is not large enough\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);
|
||||
}
|
||||
|
||||
|
||||
void report_insufficient_metaspace(size_t required_size) {
|
||||
warning("\nThe MaxMetaspaceSize of " SIZE_FORMAT " bytes is not large enough.\n"
|
||||
"Either don't specify the -XX:MaxMetaspaceSize=<size>\n"
|
||||
"or increase the size to at least " SIZE_FORMAT ".\n",
|
||||
MaxMetaspaceSize, required_size);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
void report_java_out_of_memory(const char* message) {
|
||||
static jint out_of_memory_reported = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue