Skip to content

Commit

Permalink
8291443: Obsolete the PrintSharedDictionary flag
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, iklam
  • Loading branch information
matias9927 authored and iklam committed Oct 24, 2022
1 parent 5b3de6e commit fefbddf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/hotspot/share/cds/cds_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") \
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/NonBootLoaderClasses.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) throws Exception {
.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");
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/appcds/HelloExtTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void main(String[] args) throws Exception {

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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public static void main(String[] args) throws Exception {

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" +
Expand Down Expand Up @@ -120,8 +119,7 @@ public static void main(String[] args) throws Exception {
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"));


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static void main(String[] args) throws Throwable {
// 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));
Expand Down

1 comment on commit fefbddf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.