8204591: Expire/remove the UseAppCDS option in JDK 12
Reviewed-by: jiangli, mseledtsov, iklam
This commit is contained in:
parent
66025558bb
commit
0140ddadab
src/hotspot/share/runtime
test/hotspot/jtreg/runtime/appcds
@ -561,7 +561,6 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
||||
{ "SharedMiscCodeSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
||||
{ "UseUTCFileTimestamp", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "UseAppCDS", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "InlineNotify", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "EnableTracing", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "UseLockedTracing", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
@ -1274,13 +1273,9 @@ bool Arguments::process_argument(const char* arg,
|
||||
char stripped_argname[BUFLEN+1]; // +1 for '\0'
|
||||
jio_snprintf(stripped_argname, arg_len+1, "%s", argname); // +1 for '\0'
|
||||
if (is_obsolete_flag(stripped_argname, &since)) {
|
||||
if (strcmp(stripped_argname, "UseAppCDS") != 0) {
|
||||
char version[256];
|
||||
since.to_string(version, sizeof(version));
|
||||
warning("Ignoring option %s; support was removed in %s", stripped_argname, version);
|
||||
} else {
|
||||
warning("Ignoring obsolete option UseAppCDS; AppCDS is automatically enabled");
|
||||
}
|
||||
char version[256];
|
||||
since.to_string(version, sizeof(version));
|
||||
warning("Ignoring option %s; support was removed in %s", stripped_argname, version);
|
||||
return true;
|
||||
}
|
||||
#ifndef PRODUCT
|
||||
|
@ -71,8 +71,6 @@ public class CommandLineFlagComboNegative {
|
||||
"Class data sharing is inconsistent with other specified options", 1) );
|
||||
testTable.add( new TestVector("-XX:+UseCompressedClassPointers", "-XX:-UseCompressedClassPointers",
|
||||
"Class data sharing is inconsistent with other specified options", 1) );
|
||||
testTable.add( new TestVector("-XX:-UseAppCDS", "-XX:+UseAppCDS",
|
||||
"Ignoring obsolete option UseAppCDS; AppCDS is automatically enabled", 0) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary Try different combination of mismatched UseAppCDS between dump time and run time.
|
||||
* @requires vm.cds
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* @compile test-classes/CheckIfShared.java
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main MismatchedUseAppCDS
|
||||
*/
|
||||
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MismatchedUseAppCDS {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String wbJar = JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox");
|
||||
String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
|
||||
|
||||
String appJar = JarBuilder.build("MismatchedUseAppCDS", "CheckIfShared");
|
||||
|
||||
OutputAnalyzer output;
|
||||
|
||||
// (1): dump with -XX:+UseAppCDS, but run with -XX:-UseAppCDS
|
||||
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
|
||||
// command-line arguments ...
|
||||
"-XX:+UseAppCDS",
|
||||
use_whitebox_jar);
|
||||
|
||||
output = TestCommon.exec(appJar,
|
||||
// command-line arguments ...
|
||||
use_whitebox_jar,
|
||||
"-XX:-UseAppCDS",
|
||||
"-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+WhiteBoxAPI",
|
||||
"CheckIfShared", "true");
|
||||
TestCommon.checkExec(output);
|
||||
|
||||
// (2): dump with -XX:-UseAppCDS, but run with -XX:+UseAppCDS
|
||||
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
|
||||
// command-line arguments ...
|
||||
"-XX:-UseAppCDS",
|
||||
use_whitebox_jar);
|
||||
|
||||
output = TestCommon.exec(appJar,
|
||||
// command-line arguments ...
|
||||
use_whitebox_jar,
|
||||
"-XX:+UseAppCDS",
|
||||
"-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+WhiteBoxAPI",
|
||||
"CheckIfShared", "true");
|
||||
TestCommon.checkExec(output);
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
public class CheckIfShared {
|
||||
public static void main(String args[]) throws Exception {
|
||||
WhiteBox wb = WhiteBox.getWhiteBox();
|
||||
if ("true".equals(args[0])) {
|
||||
if (!wb.isSharedClass(CheckIfShared.class)) {
|
||||
throw new RuntimeException("wb.isSharedClass(CheckIfShared.class) should be true");
|
||||
}
|
||||
} else {
|
||||
if (wb.isSharedClass(CheckIfShared.class)) {
|
||||
throw new RuntimeException("wb.isSharedClass(CheckIfShared.class) should be false");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user