8291443: Obsolete the PrintSharedDictionary flag

Reviewed-by: dholmes, iklam
This commit is contained in:
Matias Saavedra Silva 2022-10-24 16:08:51 +00:00 committed by Ioi Lam
parent 5b3de6e143
commit fefbddf835
6 changed files with 6 additions and 11 deletions

@ -52,10 +52,6 @@
product(bool, PrintSharedArchiveAndExit, false, \
"Print shared archive file contents") \
\
product(bool, PrintSharedDictionary, false, \
"If PrintSharedArchiveAndExit is true, also print the shared " \
"dictionary") \
\
product(size_t, SharedBaseAddress, LP64_ONLY(32*G) \
NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
"Address to allocate shared memory region for class data") \

@ -551,6 +551,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "PreferContainerQuotaForCPUCount", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "AliasLevel", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "UseCodeAging", JDK_Version::undefined(), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "PrintSharedDictionary", JDK_Version::undefined(), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "G1ConcRefinementGreenZone", JDK_Version::undefined(), JDK_Version::jdk(20), JDK_Version::undefined() },
{ "G1ConcRefinementYellowZone", JDK_Version::undefined(), JDK_Version::jdk(20), JDK_Version::undefined() },

@ -51,7 +51,7 @@ public class NonBootLoaderClasses {
.setUseVersion(false)
.addSuffix("-Djava.class.path=",
"-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./" + archiveName,
"-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary");
"-XX:+PrintSharedArchiveAndExit");
CDSTestUtils.run(opts)
.assertNormalExit(output -> {
output.shouldContain("archive is valid");

@ -62,7 +62,7 @@ public class HelloExtTest {
TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",
"-cp", appJar, bootClassPath, "-Xlog:class+load",
"-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary",
"-XX:+PrintSharedArchiveAndExit",
"HelloExt")
.assertNormalExit(output -> output.shouldNotMatch(class_pattern));
}

@ -72,8 +72,7 @@ public class PrintSharedArchiveAndExit {
TestCommon.run(
"-cp", cp,
"-XX:+PrintSharedArchiveAndExit",
"-XX:+PrintSharedDictionary") // Test PrintSharedDictionary as well.
"-XX:+PrintSharedArchiveAndExit")
.ifNoMappingFailure(output -> check(output, 0, true, lastCheckMsg, "java.lang.Object"));
log("Normal execution -- Make sure -version, help message and app main()\n" +
@ -120,8 +119,7 @@ public class PrintSharedArchiveAndExit {
log("Even if hello.jar is out of date, we should still be able to print the dictionary.");
TestCommon.run(
"-cp", cp,
"-XX:+PrintSharedArchiveAndExit",
"-XX:+PrintSharedDictionary") // Test PrintSharedDictionary as well.
"-XX:+PrintSharedArchiveAndExit")
.ifNoMappingFailure(output -> check(output, 1, true, lastCheckMsg, "java.lang.Object"));

@ -83,7 +83,7 @@ public class AnonVmClassesDuringDump {
// inspect the archive and make sure no anonymous class is in there
TestCommon.run("-cp", appJar,
"-XX:+UnlockDiagnosticVMOptions", cdsDiagnosticOption,
"-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary", Hello.class.getName())
"-XX:+PrintSharedArchiveAndExit", Hello.class.getName())
.assertNormalExit(dynamicMode ?
output -> output.shouldMatch(pattern) :
output -> output.shouldNotMatch(pattern));