6962930: make the string table size configurable

Reviewed-by: never, phh, stefank, kamg, dholmes, coleenp
This commit is contained in:
John Coomes 2011-03-21 18:38:00 -07:00
parent 31ac558f3d
commit 1ed31f9194
5 changed files with 32 additions and 29 deletions

View file

@ -2819,22 +2819,38 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
}
void Arguments::set_shared_spaces_flags() {
const bool must_share = DumpSharedSpaces || RequireSharedSpaces;
const bool might_share = must_share || UseSharedSpaces;
// The string table is part of the shared archive so the size must match.
if (!FLAG_IS_DEFAULT(StringTableSize)) {
// Disable sharing.
if (must_share) {
warning("disabling shared archive %s because of non-default "
"StringTableSize", DumpSharedSpaces ? "creation" : "use");
}
if (might_share) {
FLAG_SET_DEFAULT(DumpSharedSpaces, false);
FLAG_SET_DEFAULT(RequireSharedSpaces, false);
FLAG_SET_DEFAULT(UseSharedSpaces, false);
}
return;
}
// Check whether class data sharing settings conflict with GC, compressed oops
// or page size, and fix them up. Explicit sharing options override other
// settings.
const bool cannot_share = UseConcMarkSweepGC || CMSIncrementalMode ||
UseG1GC || UseParNewGC || UseParallelGC || UseParallelOldGC ||
UseCompressedOops || UseLargePages && FLAG_IS_CMDLINE(UseLargePages);
const bool must_share = DumpSharedSpaces || RequireSharedSpaces;
const bool might_share = must_share || UseSharedSpaces;
if (cannot_share) {
if (must_share) {
warning("selecting serial gc and disabling large pages %s"
"because of %s", "" LP64_ONLY("and compressed oops "),
DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on");
force_serial_gc();
FLAG_SET_CMDLINE(bool, UseLargePages, false);
LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false));
warning("selecting serial gc and disabling large pages %s"
"because of %s", "" LP64_ONLY("and compressed oops "),
DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on");
force_serial_gc();
FLAG_SET_CMDLINE(bool, UseLargePages, false);
LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false));
} else {
if (UseSharedSpaces && Verbose) {
warning("turning off use of shared archive because of "