提交 6ac2bb7b 编写于 作者: H hseigel

8007018: RFE: -XX:+UseLargePages does not work with CDS

Summary: Remove command line restriction.  It should just work.
Reviewed-by: ctornqvi, coleenp, dholmes
上级 02ab8ae9
...@@ -3084,36 +3084,27 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat ...@@ -3084,36 +3084,27 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
} }
void Arguments::set_shared_spaces_flags() { void Arguments::set_shared_spaces_flags() {
const bool must_share = DumpSharedSpaces || RequireSharedSpaces; #ifdef _LP64
const bool might_share = must_share || UseSharedSpaces; const bool must_share = DumpSharedSpaces || RequireSharedSpaces;
// CompressedOops cannot be used with CDS. The offsets of oopmaps and // CompressedOops cannot be used with CDS. The offsets of oopmaps and
// static fields are incorrect in the archive. With some more clever // static fields are incorrect in the archive. With some more clever
// initialization, this restriction can probably be lifted. // initialization, this restriction can probably be lifted.
// ??? UseLargePages might be okay now if (UseCompressedOops) {
const bool cannot_share = UseCompressedOops || if (must_share) {
(UseLargePages && FLAG_IS_CMDLINE(UseLargePages)); warning("disabling compressed oops because of %s",
if (cannot_share) { DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on");
if (must_share) { FLAG_SET_CMDLINE(bool, UseCompressedOops, false);
warning("disabling large pages %s" FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false);
"because of %s", "" LP64_ONLY("and compressed oops "), } else {
DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on"); // Prefer compressed oops to class data sharing
FLAG_SET_CMDLINE(bool, UseLargePages, false); if (UseSharedSpaces && Verbose) {
LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false)); warning("turning off use of shared archive because of compressed oops");
LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false)); }
} else { no_shared_spaces();
// Prefer compressed oops and large pages to class data sharing
if (UseSharedSpaces && Verbose) {
warning("turning off use of shared archive because of large pages%s",
"" LP64_ONLY(" and/or compressed oops"));
} }
no_shared_spaces();
} }
} else if (UseLargePages && might_share) { #endif
// Disable large pages to allow shared spaces. This is sub-optimal, since
// there may not even be a shared archive to use.
FLAG_SET_DEFAULT(UseLargePages, false);
}
if (DumpSharedSpaces) { if (DumpSharedSpaces) {
if (RequireSharedSpaces) { if (RequireSharedSpaces) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册