mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
7196103: NPG: Unable to allocate bit map for parallel garbage collection for the requested heap size
Don't allocate huge class metaspace size by default on x64 Reviewed-by: stefank, jmasa, kvn
This commit is contained in:
parent
12b9a4edbb
commit
6fda647450
4 changed files with 24 additions and 8 deletions
|
@ -1427,6 +1427,16 @@ void Arguments::set_ergonomics_flags() {
|
|||
// if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) {
|
||||
// FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true);
|
||||
// }
|
||||
// Set the ClassMetaspaceSize to something that will not need to be
|
||||
// expanded, since it cannot be expanded.
|
||||
if (UseCompressedKlassPointers && FLAG_IS_DEFAULT(ClassMetaspaceSize)) {
|
||||
// 100,000 classes seems like a good size, so 100M assumes around 1K
|
||||
// per klass. The vtable and oopMap is embedded so we don't have a fixed
|
||||
// size per klass. Eventually, this will be parameterized because it
|
||||
// would also be useful to determine the optimal size of the
|
||||
// systemDictionary.
|
||||
FLAG_SET_ERGO(uintx, ClassMetaspaceSize, 100*M);
|
||||
}
|
||||
}
|
||||
// Also checks that certain machines are slower with compressed oops
|
||||
// in vm_version initialization code.
|
||||
|
@ -1965,6 +1975,9 @@ bool Arguments::check_vm_args_consistency() {
|
|||
|
||||
status = status && verify_object_alignment();
|
||||
|
||||
status = status && verify_min_value(ClassMetaspaceSize, 1*M,
|
||||
"ClassMetaspaceSize");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2916,7 +2929,7 @@ void Arguments::set_shared_spaces_flags() {
|
|||
(UseLargePages && FLAG_IS_CMDLINE(UseLargePages));
|
||||
if (cannot_share) {
|
||||
if (must_share) {
|
||||
warning("disabling large pages%s"
|
||||
warning("disabling large pages %s"
|
||||
"because of %s", "" LP64_ONLY("and compressed oops "),
|
||||
DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on");
|
||||
FLAG_SET_CMDLINE(bool, UseLargePages, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue