diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index 1362a4fcc29..d2128f4ba2b 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -4105,6 +4105,13 @@ jint Arguments::apply_ergo() { } UseBiasedLocking = false; +#ifdef _LP64 + if (!FLAG_IS_DEFAULT(UseCompressedClassPointers) && !UseCompressedClassPointers) { + warning("Compressed class pointers are required with Lilliput build; ignoring UsCompressedClassPointers flag."); + } + UseCompressedClassPointers = true; +#endif + return JNI_OK; } diff --git a/test/hotspot/jtreg/compiler/c1/TestArrayCopyToFromObject.java b/test/hotspot/jtreg/compiler/c1/TestArrayCopyToFromObject.java index e875bd5f7c9..13aad66860a 100644 --- a/test/hotspot/jtreg/compiler/c1/TestArrayCopyToFromObject.java +++ b/test/hotspot/jtreg/compiler/c1/TestArrayCopyToFromObject.java @@ -25,7 +25,6 @@ * @test * @bug 8160591 * @summary C1-generated code for System.arraycopy() does not throw an ArrayStoreException if 'dst' is no a "proper" array (i.e., it is java.lang.Object) - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xcomp -XX:-UseCompressedClassPointers -XX:CompileOnly=TestArrayCopyToFromObject.test TestArrayCopyToFromObject * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xcomp -XX:+UseCompressedClassPointers -XX:CompileOnly=TestArrayCopyToFromObject.test TestArrayCopyToFromObject */ public class TestArrayCopyToFromObject { diff --git a/test/hotspot/jtreg/compiler/unsafe/OpaqueAccesses.java b/test/hotspot/jtreg/compiler/unsafe/OpaqueAccesses.java index a646728b07a..3dab816c141 100644 --- a/test/hotspot/jtreg/compiler/unsafe/OpaqueAccesses.java +++ b/test/hotspot/jtreg/compiler/unsafe/OpaqueAccesses.java @@ -33,19 +33,9 @@ * compiler.unsafe.OpaqueAccesses * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions * -XX:-TieredCompilation -Xbatch - * -XX:+UseCompressedOops -XX:-UseCompressedClassPointers - * -XX:CompileCommand=dontinline,compiler.unsafe.OpaqueAccesses::test* - * compiler.unsafe.OpaqueAccesses - * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:-TieredCompilation -Xbatch * -XX:-UseCompressedOops -XX:+UseCompressedClassPointers * -XX:CompileCommand=dontinline,compiler.unsafe.OpaqueAccesses::test* * compiler.unsafe.OpaqueAccesses - * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:-TieredCompilation -Xbatch - * -XX:-UseCompressedOops -XX:-UseCompressedClassPointers - * -XX:CompileCommand=dontinline,compiler.unsafe.OpaqueAccesses::test* - * compiler.unsafe.OpaqueAccesses */ package compiler.unsafe; diff --git a/test/hotspot/jtreg/gc/arguments/TestCompressedClassFlags.java b/test/hotspot/jtreg/gc/arguments/TestCompressedClassFlags.java deleted file mode 100644 index 89708924f90..00000000000 --- a/test/hotspot/jtreg/gc/arguments/TestCompressedClassFlags.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2013, 2020, 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. - */ - -package gc.arguments; - -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.Platform; - -/* - * @test - * @bug 8015107 - * @summary Tests that VM prints a warning when -XX:CompressedClassSpaceSize - * is used together with -XX:-UseCompressedClassPointers - * @library /test/lib - * @library / - * @modules java.base/jdk.internal.misc - * java.management - * @run driver gc.arguments.TestCompressedClassFlags - */ -public class TestCompressedClassFlags { - public static void main(String[] args) throws Exception { - if (Platform.is64bit()) { - OutputAnalyzer output = runJava("-XX:CompressedClassSpaceSize=1g", - "-XX:-UseCompressedClassPointers", - "-version"); - output.shouldContain("warning"); - output.shouldNotContain("error"); - output.shouldHaveExitValue(0); - } - } - - private static OutputAnalyzer runJava(String ... args) throws Exception { - ProcessBuilder pb = GCArguments.createJavaProcessBuilder(args); - return new OutputAnalyzer(pb.start()); - } -} diff --git a/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java b/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java index f6f7c9af999..e86600a2818 100644 --- a/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java +++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java @@ -47,8 +47,8 @@ * java.compiler * java.management/sun.management * jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters */ /* @test TestMetaspacePerfCountersParallel @@ -61,8 +61,8 @@ * java.compiler * java.management/sun.management * jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters */ /* @test TestMetaspacePerfCountersG1 @@ -75,8 +75,8 @@ * java.compiler * java.management/sun.management * jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters */ /* @test TestMetaspacePerfCountersShenandoah @@ -89,8 +89,8 @@ * java.compiler * java.management/sun.management * jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters */ public class TestMetaspacePerfCounters { public static Class fooClass = null; @@ -174,7 +174,7 @@ private static Class compileAndLoad(String name, String source) throws Except } private static boolean isUsingCompressedClassPointers() { - return Platform.is64bit() && InputArguments.contains("-XX:+UseCompressedClassPointers"); + return Platform.is64bit(); } private static long getMinCapacity(String ns) throws Exception { diff --git a/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java b/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java index 1dd929afebd..1a948a88253 100644 --- a/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java +++ b/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java @@ -39,8 +39,8 @@ * @modules java.base/jdk.internal.misc * java.management * jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools */ public class TestPerfCountersAndMemoryPools { public static void main(String[] args) throws Exception { diff --git a/test/hotspot/jtreg/gc/metaspace/TestSizeTransitions.java b/test/hotspot/jtreg/gc/metaspace/TestSizeTransitions.java index 5ecacc7be70..9dc2414ee83 100644 --- a/test/hotspot/jtreg/gc/metaspace/TestSizeTransitions.java +++ b/test/hotspot/jtreg/gc/metaspace/TestSizeTransitions.java @@ -35,24 +35,21 @@ * @requires vm.gc.Serial * @summary Tests that the metaspace size transition logging is done correctly. * @library /test/lib - * @run driver gc.metaspace.TestSizeTransitions false -XX:+UseSerialGC - * @run driver gc.metaspace.TestSizeTransitions true -XX:+UseSerialGC + * @run driver gc.metaspace.TestSizeTransitions -XX:+UseSerialGC */ /* @test TestSizeTransitionsParallel * @requires vm.gc.Parallel * @summary Tests that the metaspace size transition logging is done correctly. * @library /test/lib - * @run driver gc.metaspace.TestSizeTransitions false -XX:+UseParallelGC - * @run driver gc.metaspace.TestSizeTransitions true -XX:+UseParallelGC + * @run driver gc.metaspace.TestSizeTransitions -XX:+UseParallelGC */ /* @test TestSizeTransitionsG1 * @requires vm.gc.G1 * @summary Tests that the metaspace size transition logging is done correctly. * @library /test/lib - * @run driver gc.metaspace.TestSizeTransitions false -XX:+UseG1GC - * @run driver gc.metaspace.TestSizeTransitions true -XX:+UseG1GC + * @run driver gc.metaspace.TestSizeTransitions -XX:+UseG1GC */ public class TestSizeTransitions { @@ -90,25 +87,15 @@ public static void main(String... args) throws Exception { SIZE_TRANSITION_REGEX); public static void main(String... args) throws Exception { - // args: - if (args.length != 2) { + // args: + if (args.length != 1) { throw new RuntimeException("wrong number of args: " + args.length); } final boolean hasCompressedKlassPointers = Platform.is64bit(); - final boolean useCompressedKlassPointers = Boolean.parseBoolean(args[0]); - final String gcArg = args[1]; - - if (!hasCompressedKlassPointers && useCompressedKlassPointers) { - // No need to run this configuration. - System.out.println("Skipping test."); - return; - } + final String gcArg = args[0]; List jvmArgs = new ArrayList<>(); - if (hasCompressedKlassPointers) { - jvmArgs.add(useCompressedKlassPointers ? "-XX:+UseCompressedClassPointers" : "-XX:-UseCompressedClassPointers"); - } jvmArgs.add(gcArg); jvmArgs.add("-Xmx256m"); jvmArgs.add("-Xlog:gc,gc+metaspace=info"); @@ -124,7 +111,7 @@ public static void main(String... args) throws Exception { System.out.println(output.getStdout()); output.shouldHaveExitValue(0); - if (useCompressedKlassPointers) { + if (hasCompressedKlassPointers) { output.stdoutShouldMatch(COMPRESSED_KLASS_POINTERS_REGEX); output.stdoutShouldNotMatch(NO_COMPRESSED_KLASS_POINTERS_REGEX); } else { diff --git a/test/hotspot/jtreg/gtest/MetaspaceGtests.java b/test/hotspot/jtreg/gtest/MetaspaceGtests.java index c4d0f9217dc..f314c74ca24 100644 --- a/test/hotspot/jtreg/gtest/MetaspaceGtests.java +++ b/test/hotspot/jtreg/gtest/MetaspaceGtests.java @@ -86,16 +86,3 @@ * @requires vm.flagless * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:+UnlockDiagnosticVMOptions -XX:VerifyMetaspaceInterval=3 -XX:+MetaspaceGuardAllocations */ - - - - -/* @test id=balanced-no-ccs - * @summary Run metaspace-related gtests with compressed class pointers off - * @requires vm.bits == 64 - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.xml - * @requires vm.flagless - * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=balanced -XX:-UseCompressedClassPointers - */ diff --git a/test/hotspot/jtreg/gtest/MetaspaceUtilsGtests.java b/test/hotspot/jtreg/gtest/MetaspaceUtilsGtests.java index 7a9b1c8dfb3..27a04e4e3c4 100644 --- a/test/hotspot/jtreg/gtest/MetaspaceUtilsGtests.java +++ b/test/hotspot/jtreg/gtest/MetaspaceUtilsGtests.java @@ -27,14 +27,3 @@ * are not tested explicitly in the standard gtests. * */ - -/* @test - * @bug 8264008 - * @summary Run metaspace utils related gtests with compressed class pointers off - * @requires vm.bits == 64 - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.xml - * @requires vm.flagless - * @run main/native GTestWrapper --gtest_filter=MetaspaceUtils* -XX:-UseCompressedClassPointers - */ diff --git a/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassSpaceSize.java b/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassSpaceSize.java index 0a25b68567e..27223e852ff 100644 --- a/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassSpaceSize.java +++ b/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassSpaceSize.java @@ -83,13 +83,5 @@ public static void main(String[] args) throws Exception { output = new OutputAnalyzer(pb.start()); output.shouldMatch("Compressed class space.*3221225472") .shouldHaveExitValue(0); - - - pb = ProcessTools.createJavaProcessBuilder("-XX:-UseCompressedClassPointers", - "-XX:CompressedClassSpaceSize=1m", - "-version"); - output = new OutputAnalyzer(pb.start()); - output.shouldContain("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used") - .shouldHaveExitValue(0); } } diff --git a/test/hotspot/jtreg/runtime/FieldLayout/FieldDensityTest.java b/test/hotspot/jtreg/runtime/FieldLayout/FieldDensityTest.java index 5f4fb7a79c4..73b01c01311 100644 --- a/test/hotspot/jtreg/runtime/FieldLayout/FieldDensityTest.java +++ b/test/hotspot/jtreg/runtime/FieldLayout/FieldDensityTest.java @@ -38,7 +38,6 @@ * @modules java.base/jdk.internal.misc * java.management * @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers FieldDensityTest - * @run main/othervm -XX:+UseCompressedOops -XX:-UseCompressedClassPointers FieldDensityTest */ import java.lang.reflect.Field; diff --git a/test/hotspot/jtreg/runtime/Metaspace/PrintMetaspaceDcmd.java b/test/hotspot/jtreg/runtime/Metaspace/PrintMetaspaceDcmd.java index 413a911e700..33aa0c56f17 100644 --- a/test/hotspot/jtreg/runtime/Metaspace/PrintMetaspaceDcmd.java +++ b/test/hotspot/jtreg/runtime/Metaspace/PrintMetaspaceDcmd.java @@ -67,26 +67,6 @@ * @run main/othervm -Dwith-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UnlockDiagnosticVMOptions -XX:+MetaspaceGuardAllocations PrintMetaspaceDcmd */ -/* - * @test id=test-64bit-noccs - * @summary Test the VM.metaspace command - * @requires vm.bits == "64" - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - * @run main/othervm -Dwithout-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:-UseCompressedOops -XX:-UseCompressedClassPointers PrintMetaspaceDcmd - */ - - /* - * @test id=test-nospecified - * @summary Test the VM.metaspace command - * @requires vm.bits == "64" - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - * @run main/othervm -Dno-specified-flag -Xmx100M -XX:-UseCompressedOops -XX:-UseCompressedClassPointers PrintMetaspaceDcmd - */ - /* * @test test-32bit * @summary Test the VM.metaspace command diff --git a/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagComboNegative.java b/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagComboNegative.java index 89fe868349b..ea1788e5999 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagComboNegative.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagComboNegative.java @@ -67,8 +67,6 @@ private void initTestTable() { } testTable.add( new TestVector("-XX:+UseCompressedOops", "-XX:-UseCompressedOops", "The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.", 1) ); - testTable.add( new TestVector("-XX:+UseCompressedClassPointers", "-XX:-UseCompressedClassPointers", - "The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.", 1) ); } private void runTests() throws Exception diff --git a/test/hotspot/jtreg/runtime/cds/appcds/TestCombinedCompressedFlags.java b/test/hotspot/jtreg/runtime/cds/appcds/TestCombinedCompressedFlags.java index 4f3681d30df..24d4f95cdf3 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/TestCombinedCompressedFlags.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/TestCombinedCompressedFlags.java @@ -46,12 +46,10 @@ public class TestCombinedCompressedFlags { static class ConfArg { public boolean useCompressedOops; // UseCompressedOops - public boolean useCompressedClassPointers; // UseCompressedClassPointers public String msg; public int code; - public ConfArg(boolean useCompressedOops, boolean useCompressedClassPointers, String msg, int code) { + public ConfArg(boolean useCompressedOops, String msg, int code) { this.useCompressedOops = useCompressedOops; - this.useCompressedClassPointers = useCompressedClassPointers; this.msg = msg; this.code = code; } @@ -66,65 +64,28 @@ public RunArg(ConfArg arg) { } private void initExecArgs() { /* The combinations have four cases. - * UseCompressedOops UseCompressedClassPointers Result + * UseCompressedOops Result * 1. - * dump: on on - * test: on on Pass - * on off Fail - * off on Fail - * off off Fail + * dump: on + * test: on Pass + * off Fail * 2. - * dump: on off - * test: on off Pass - * on on Fail - * off on Pass - * off off Fail - * 3. - * dump: off on - * test: off on Pass - * on on Fail - * on off Fail - * 4. - * dump: off off - * test: off off Pass - * on on Fail - * on off Fail + * dump: off + * test: off Pass + * on Fail **/ execArgs = new ArrayList(); - if (dumpArg.useCompressedOops && dumpArg.useCompressedClassPointers) { + if (dumpArg.useCompressedOops) { execArgs - .add(new ConfArg(true, true, HELLO_STRING, PASS)); + .add(new ConfArg(true, HELLO_STRING, PASS)); execArgs - .add(new ConfArg(true, false, EXEC_ABNORMAL_MSG, FAIL)); - execArgs - .add(new ConfArg(false, true, EXEC_ABNORMAL_MSG, FAIL)); - execArgs - .add(new ConfArg(false, false, EXEC_ABNORMAL_MSG, FAIL)); - - } else if(dumpArg.useCompressedOops && !dumpArg.useCompressedClassPointers) { - execArgs - .add(new ConfArg(true, false, HELLO_STRING, PASS)); - execArgs - .add(new ConfArg(true, true, EXEC_ABNORMAL_MSG, FAIL)); - execArgs - .add(new ConfArg(false, true, EXEC_ABNORMAL_MSG, FAIL)); - execArgs - .add(new ConfArg(false, false, EXEC_ABNORMAL_MSG, FAIL)); + .add(new ConfArg(false, EXEC_ABNORMAL_MSG, FAIL)); - } else if (!dumpArg.useCompressedOops && dumpArg.useCompressedClassPointers) { - execArgs - .add(new ConfArg(false, true, HELLO_STRING, PASS)); + } else if (!dumpArg.useCompressedOops) { execArgs - .add(new ConfArg(true, true, EXEC_ABNORMAL_MSG, FAIL)); + .add(new ConfArg(false, HELLO_STRING, PASS)); execArgs - .add(new ConfArg(true, false, EXEC_ABNORMAL_MSG, FAIL)); - } else if (!dumpArg.useCompressedOops && !dumpArg.useCompressedClassPointers) { - execArgs - .add(new ConfArg(false, false, HELLO_STRING, PASS)); - execArgs - .add(new ConfArg(true, true, EXEC_ABNORMAL_MSG, FAIL)); - execArgs - .add(new ConfArg(true, false, EXEC_ABNORMAL_MSG, FAIL)); + .add(new ConfArg(true, EXEC_ABNORMAL_MSG, FAIL)); } } } @@ -134,23 +95,14 @@ public static String getCompressedOopsArg(boolean on) { else return "-XX:-UseCompressedOops"; } - public static String getCompressedClassPointersArg(boolean on) { - if (on) return "-XX:+UseCompressedClassPointers"; - else return "-XX:-UseCompressedClassPointers"; - } - public static List runList; public static void configureRunArgs() { runList = new ArrayList(); runList - .add(new RunArg(new ConfArg(true, true, null, PASS))); - runList - .add(new RunArg(new ConfArg(true, false, null, PASS))); - runList - .add(new RunArg(new ConfArg(false, true, null, PASS))); + .add(new RunArg(new ConfArg(true, null, PASS))); runList - .add(new RunArg(new ConfArg(false, false, null, PASS))); + .add(new RunArg(new ConfArg(false, null, PASS))); } public static void main(String[] args) throws Exception { @@ -162,7 +114,6 @@ public static void main(String[] args) throws Exception { .dump(helloJar, new String[] {"Hello"}, getCompressedOopsArg(t.dumpArg.useCompressedOops), - getCompressedClassPointersArg(t.dumpArg.useCompressedClassPointers), "-Xlog:cds", "-XX:NativeMemoryTracking=detail"); out.shouldContain("Dumping shared data to file:"); @@ -175,7 +126,6 @@ public static void main(String[] args) throws Exception { "-Xlog:cds", "-XX:NativeMemoryTracking=detail", getCompressedOopsArg(c.useCompressedOops), - getCompressedClassPointersArg(c.useCompressedClassPointers), "Hello"); out.shouldContain(c.msg); out.shouldHaveExitValue(c.code); diff --git a/test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java b/test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java index 585840c9f2a..de045d03337 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java @@ -72,19 +72,7 @@ public static void main(String... args) throws Exception { out.shouldContain(ERR_MSG); out.shouldHaveExitValue(1); - System.out.println("3. Run with -UseCompressedOops -UseCompressedClassPointers"); - out = TestCommon - .exec(helloJar, - "-XX:+UseSerialGC", - "-XX:-UseCompressedOops", - "-XX:-UseCompressedClassPointers", - "-Xlog:cds", - "Hello"); - out.shouldContain(UNABLE_TO_USE_ARCHIVE); - out.shouldContain(ERR_MSG); - out.shouldHaveExitValue(1); - - System.out.println("4. Run with -UseCompressedOops +UseCompressedClassPointers"); + System.out.println("3. Run with -UseCompressedOops +UseCompressedClassPointers"); out = TestCommon .exec(helloJar, "-XX:+UseSerialGC", @@ -95,19 +83,7 @@ public static void main(String... args) throws Exception { out.shouldContain(HELLO); out.shouldHaveExitValue(0); - System.out.println("5. Run with +UseCompressedOops -UseCompressedClassPointers"); - out = TestCommon - .exec(helloJar, - "-XX:+UseSerialGC", - "-XX:+UseCompressedOops", - "-XX:-UseCompressedClassPointers", - "-Xlog:cds", - "Hello"); - out.shouldContain(UNABLE_TO_USE_ARCHIVE); - out.shouldContain(ERR_MSG); - out.shouldHaveExitValue(1); - - System.out.println("6. Run with +UseCompressedOops +UseCompressedClassPointers"); + System.out.println("4. Run with +UseCompressedOops +UseCompressedClassPointers"); out = TestCommon .exec(helloJar, "-XX:+UseSerialGC", @@ -119,18 +95,7 @@ public static void main(String... args) throws Exception { out.shouldContain(ERR_MSG); out.shouldHaveExitValue(1); - System.out.println("7. Dump with -UseCompressedOops -UseCompressedClassPointers"); - out = TestCommon - .dump(helloJar, - new String[] {"Hello"}, - "-XX:+UseSerialGC", - "-XX:-UseCompressedOops", - "-XX:+UseCompressedClassPointers", - "-Xlog:cds"); - out.shouldContain("Dumping shared data to file:"); - out.shouldHaveExitValue(0); - - System.out.println("8. Run with ZGC"); + System.out.println("5. Run with ZGC"); out = TestCommon .exec(helloJar, "-XX:+UseZGC",