6888573: class data sharing does not always disable large pages
Reviewed-by: phh
This commit is contained in:
parent
a59a9f6a2b
commit
a792499b68
@ -179,9 +179,14 @@ char* GenCollectedHeap::allocate(size_t alignment,
|
|||||||
}
|
}
|
||||||
n_covered_regions += _gen_specs[i]->n_covered_regions();
|
n_covered_regions += _gen_specs[i]->n_covered_regions();
|
||||||
}
|
}
|
||||||
assert(total_reserved % pageSize == 0, "Gen size");
|
assert(total_reserved % pageSize == 0,
|
||||||
|
err_msg("Gen size; total_reserved=" SIZE_FORMAT ", pageSize="
|
||||||
|
SIZE_FORMAT, total_reserved, pageSize));
|
||||||
total_reserved += perm_gen_spec->max_size();
|
total_reserved += perm_gen_spec->max_size();
|
||||||
assert(total_reserved % pageSize == 0, "Perm Gen size");
|
assert(total_reserved % pageSize == 0,
|
||||||
|
err_msg("Perm size; total_reserved=" SIZE_FORMAT ", pageSize="
|
||||||
|
SIZE_FORMAT ", perm gen max=" SIZE_FORMAT, total_reserved,
|
||||||
|
pageSize, perm_gen_spec->max_size()));
|
||||||
|
|
||||||
if (total_reserved < perm_gen_spec->max_size()) {
|
if (total_reserved < perm_gen_spec->max_size()) {
|
||||||
vm_exit_during_initialization(overflow_msg);
|
vm_exit_during_initialization(overflow_msg);
|
||||||
|
@ -1697,20 +1697,21 @@ bool Arguments::check_vm_args_consistency() {
|
|||||||
|
|
||||||
status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
|
status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
|
||||||
|
|
||||||
// Check user specified sharing option conflict with Parallel GC
|
// Check whether user-specified sharing option conflicts with GC or page size.
|
||||||
bool cannot_share = ((UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC || UseParNewGC ||
|
// Both sharing and large pages are enabled by default on some platforms;
|
||||||
UseParallelGC || UseParallelOldGC ||
|
// large pages override sharing only if explicitly set on the command line.
|
||||||
SOLARIS_ONLY(UseISM) NOT_SOLARIS(UseLargePages));
|
const bool cannot_share = UseConcMarkSweepGC || CMSIncrementalMode ||
|
||||||
|
UseG1GC || UseParNewGC || UseParallelGC || UseParallelOldGC ||
|
||||||
|
UseLargePages && FLAG_IS_CMDLINE(UseLargePages);
|
||||||
if (cannot_share) {
|
if (cannot_share) {
|
||||||
// Either force sharing on by forcing the other options off, or
|
// Either force sharing on by forcing the other options off, or
|
||||||
// force sharing off.
|
// force sharing off.
|
||||||
if (DumpSharedSpaces || ForceSharedSpaces) {
|
if (DumpSharedSpaces || ForceSharedSpaces) {
|
||||||
jio_fprintf(defaultStream::error_stream(),
|
jio_fprintf(defaultStream::error_stream(),
|
||||||
"Reverting to Serial GC because of %s\n",
|
"Using Serial GC and default page size because of %s\n",
|
||||||
ForceSharedSpaces ? " -Xshare:on" : "-Xshare:dump");
|
ForceSharedSpaces ? "-Xshare:on" : "-Xshare:dump");
|
||||||
force_serial_gc();
|
force_serial_gc();
|
||||||
FLAG_SET_DEFAULT(SOLARIS_ONLY(UseISM) NOT_SOLARIS(UseLargePages), false);
|
FLAG_SET_DEFAULT(UseLargePages, false);
|
||||||
} else {
|
} else {
|
||||||
if (UseSharedSpaces && Verbose) {
|
if (UseSharedSpaces && Verbose) {
|
||||||
jio_fprintf(defaultStream::error_stream(),
|
jio_fprintf(defaultStream::error_stream(),
|
||||||
@ -1719,6 +1720,8 @@ bool Arguments::check_vm_args_consistency() {
|
|||||||
}
|
}
|
||||||
no_shared_spaces();
|
no_shared_spaces();
|
||||||
}
|
}
|
||||||
|
} else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) {
|
||||||
|
FLAG_SET_DEFAULT(UseLargePages, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = status && check_gc_consistency();
|
status = status && check_gc_consistency();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user