< prev index next > test/hotspot/jtreg/gc/metaspace/TestSizeTransitions.java
Print this page
/* @test TestSizeTransitionsSerial
* @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 {
public static class Run {
public static void main(String... args) throws Exception {
SIZE_TRANSITION_REGEX,
SIZE_TRANSITION_REGEX,
SIZE_TRANSITION_REGEX);
public static void main(String... args) throws Exception {
- // args: <use-coops> <gc-arg>
- if (args.length != 2) {
+ // args: <gc-arg>
+ 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<String> 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");
jvmArgs.add(TestSizeTransitions.Run.class.getName());
final ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(jvmArgs);
final OutputAnalyzer output = new OutputAnalyzer(pb.start());
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 {
output.stdoutShouldMatch(NO_COMPRESSED_KLASS_POINTERS_REGEX);
output.stdoutShouldNotMatch(COMPRESSED_KLASS_POINTERS_REGEX);
< prev index next >