8290023: Remove use of IgnoreUnrecognizedVMOptions in gc tests

Reviewed-by: ayang, lkorinth, kbarrett
This commit is contained in:
Thomas Schatzl 2022-07-13 16:08:59 +00:00
parent 44fb92e2aa
commit 2583feb21b
13 changed files with 259 additions and 75 deletions

View File

@ -26,36 +26,29 @@ package gc;
/**
* @test TestObjectAlignment
* @bug 8021823
* @requires vm.bits == "64"
* @summary G1: Concurrent marking crashes with -XX:ObjectAlignmentInBytes>=32 in 64bit VMs
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=8
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=16
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=32
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=64
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=128
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=256
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=8
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=16
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=32
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=64
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=128
* @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:ObjectAlignmentInBytes=256
*/
public class TestObjectAlignment {
public static byte[] garbage;
private static boolean runsOn32bit() {
return System.getProperty("sun.arch.data.model").equals("32");
}
public static void main(String[] args) throws Exception {
if (runsOn32bit()) {
// 32 bit VMs do not allow setting ObjectAlignmentInBytes, so there is nothing to test. We still get called.
return;
}
for (int i = 0; i < 10; i++) {
garbage = new byte[1000];
System.gc();

View File

@ -36,15 +36,22 @@ package gc.epsilon;
* @run main/othervm -Xmx64m -XX:-UseTLAB
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* gc.epsilon.TestAlignment
*
*/
/**
* @test TestAlignment
* @requires vm.gc.Epsilon
* @requires vm.bits == "64"
* @summary Check Epsilon TLAB options with unusual object alignment
* @bug 8212177
* @run main/othervm -Xmx64m -XX:+UseTLAB
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestAlignment
*
* @run main/othervm -Xmx64m -XX:-UseTLAB
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestAlignment
*/

View File

@ -48,29 +48,36 @@ package gc.epsilon;
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:EpsilonMaxTLABSize=12345
* gc.epsilon.TestMaxTLAB
*
*/
/**
* @test TestMaxTLAB
* @requires vm.gc.Epsilon
* @requires vm.bits == "64"
* @summary Check EpsilonMaxTLAB options
* @bug 8212177
* @run main/othervm -Xmx64m
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:EpsilonMaxTLABSize=1
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestMaxTLAB
*
* @run main/othervm -Xmx64m
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:EpsilonMaxTLABSize=1K
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestMaxTLAB
*
* @run main/othervm -Xmx64m
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:EpsilonMaxTLABSize=1M
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestMaxTLAB
*
* @run main/othervm -Xmx64m
* -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
* -XX:EpsilonMaxTLABSize=12345
* -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
* -XX:ObjectAlignmentInBytes=16
* gc.epsilon.TestMaxTLAB
*/

View File

@ -30,6 +30,7 @@ package gc.g1;
* mark bitmaps at reclaim.
* @key randomness
* @requires vm.gc.G1
* @requires vm.debug
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@ -129,7 +130,6 @@ public class TestEagerReclaimHumongousRegionsClearMarkBits {
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+VerifyAfterGC",
"-XX:ConcGCThreads=1", // Want to make marking as slow as possible.
"-XX:+IgnoreUnrecognizedVMOptions", // G1VerifyBitmaps is develop only.
"-XX:+G1VerifyBitmaps",
TestEagerReclaimHumongousRegionsClearMarkBitsReclaimRegionFast.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());

View File

@ -33,17 +33,21 @@ package gc.g1;
* @requires vm.opt.LargePageSizeInBytes == null
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages gc.g1.TestLargePageUseForAuxMemory
* @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseLargePages gc.g1.TestLargePageUseForAuxMemory
*/
import java.util.ArrayList;
import java.util.List;
import java.lang.Math;
import java.util.Collections;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Asserts;
import jdk.test.lib.Platform;
import jtreg.SkippedException;
import jdk.test.whitebox.WhiteBox;
import jtreg.SkippedException;
public class TestLargePageUseForAuxMemory {
static final long HEAP_REGION_SIZE = 1 * 1024 * 1024;
static long largePageSize;
@ -105,19 +109,22 @@ public class TestLargePageUseForAuxMemory {
checkSize(output, expectedPageSize, "Mark Bitmap: .*page_size=([^ ]+)");
}
static List<String> getOpts(long heapsize, boolean largePageEnabled) {
return List.of("-XX:+UseG1GC",
"-XX:G1HeapRegionSize=" + HEAP_REGION_SIZE,
"-Xmx" + heapsize,
"-Xlog:pagesize,gc+init,gc+heap+coops=debug",
"-XX:" + (largePageEnabled ? "+" : "-") + "UseLargePages",
"-version");
}
static void testVM(String what, long heapsize, boolean cardsShouldUseLargePages, boolean bitmapShouldUseLargePages) throws Exception {
System.out.println(what + " heapsize " + heapsize + " card table should use large pages " + cardsShouldUseLargePages + " " +
"bitmaps should use large pages " + bitmapShouldUseLargePages);
ProcessBuilder pb;
// Test with large page enabled.
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
"-XX:G1HeapRegionSize=" + HEAP_REGION_SIZE,
"-Xmx" + heapsize,
"-Xlog:pagesize,gc+init,gc+heap+coops=debug",
"-XX:+UseLargePages",
"-XX:+IgnoreUnrecognizedVMOptions", // there is no ObjectAlignmentInBytes in 32 bit builds
"-XX:ObjectAlignmentInBytes=8",
"-version");
pb = ProcessTools.createJavaProcessBuilder(getOpts(heapsize, true));
OutputAnalyzer output = new OutputAnalyzer(pb.start());
// Only expect large page size if large pages are enabled.
@ -131,14 +138,7 @@ public class TestLargePageUseForAuxMemory {
output.shouldHaveExitValue(0);
// Test with large page disabled.
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
"-XX:G1HeapRegionSize=" + HEAP_REGION_SIZE,
"-Xmx" + heapsize,
"-Xlog:pagesize",
"-XX:-UseLargePages",
"-XX:+IgnoreUnrecognizedVMOptions", // there is no ObjectAlignmentInBytes in 32 bit builds
"-XX:ObjectAlignmentInBytes=8",
"-version");
pb = ProcessTools.createJavaProcessBuilder(getOpts(heapsize, false));
output = new OutputAnalyzer(pb.start());
checkSmallTables(output, smallPageSize);

View File

@ -34,7 +34,7 @@ package gc.g1;
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
-XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages gc.g1.TestLargePageUseForHeap
-XX:+UseLargePages gc.g1.TestLargePageUseForHeap
*/
import jdk.test.lib.process.OutputAnalyzer;

View File

@ -26,6 +26,7 @@ package gc.g1;
/*
* @test TestVerificationInConcurrentCycle
* @requires vm.gc.G1
* @requires vm.debug
* @summary Basic testing of various GC pause verification during the G1 concurrent cycle.
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
@ -36,7 +37,25 @@ package gc.g1;
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
* -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
* -XX:+IgnoreUnrecognizedVMOptions -XX:+G1VerifyBitmaps
* -XX:+G1VerifyBitmaps
* gc.g1.TestVerificationInConcurrentCycle
*/
/*
* @test TestVerificationInConcurrentCycle
* @requires vm.gc.G1
* @requires !vm.debug
* @summary Basic testing of various GC pause verification during the G1 concurrent cycle. It leaves
* out G1VerifyBitmaps as this is a debug-only option.
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
* -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
* gc.g1.TestVerificationInConcurrentCycle
*/

View File

@ -32,7 +32,7 @@ package gc.metaspace;
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=48m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
* @run main/othervm -XX:CompressedClassSpaceSize=48m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
*/
import jdk.test.lib.JDKToolLauncher;

View File

@ -37,11 +37,12 @@ import static jdk.test.lib.Asserts.*;
* @library /
* @modules java.base/jdk.internal.misc
* java.management
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:CompressedClassSpaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:-UseCompressedOops gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers gc.metaspace.TestMetaspaceMemoryPool
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:CompressedClassSpaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
*/
public class TestMetaspaceMemoryPool {
public static void main(String[] args) {
verifyThatMetaspaceMemoryManagerExists();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
@ -37,9 +37,10 @@ import static jdk.test.lib.Asserts.*;
import gc.testlibrary.PerfCounter;
import gc.testlibrary.PerfCounters;
/* @test TestMetaspacePerfCountersSerial
/* @test id=Serial-64
* @bug 8014659
* @requires vm.gc.Serial
* @requires vm.bits == "64"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
@ -47,13 +48,14 @@ import gc.testlibrary.PerfCounters;
* 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:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test TestMetaspacePerfCountersParallel
/* @test id=Parallel-64
* @bug 8014659
* @requires vm.gc.Parallel
* @requires vm.bits == "64"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
@ -61,13 +63,14 @@ import gc.testlibrary.PerfCounters;
* 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:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test TestMetaspacePerfCountersG1
/* @test id=G1-64
* @bug 8014659
* @requires vm.gc.G1
* @requires vm.bits == "64"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
@ -75,13 +78,14 @@ import gc.testlibrary.PerfCounters;
* 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:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test TestMetaspacePerfCountersShenandoah
/* @test id=Shenandoah-64
* @bug 8014659
* @requires vm.gc.Shenandoah
* @requires vm.bits == "64"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
@ -89,9 +93,96 @@ import gc.testlibrary.PerfCounters;
* 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:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters
* @run main/othervm -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=Epsilon-64
* @bug 8014659
* @requires vm.gc.Epsilon
* @requires vm.bits == "64"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseEpsilonGC gc.metaspace.TestMetaspacePerfCounters
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseEpsilonGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=Serial-32
* @bug 8014659
* @requires vm.gc.Serial
* @requires vm.bits == "32"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=Parallel-32
* @bug 8014659
* @requires vm.gc.Parallel
* @requires vm.bits == "32"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=G1-32
* @bug 8014659
* @requires vm.gc.G1
* @requires vm.bits == "32"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=Shenandoah-32
* @bug 8014659
* @requires vm.gc.Shenandoah
* @requires vm.bits == "32"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UsePerfData -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test id=Epsilon-32
* @bug 8014659
* @requires vm.gc.Epsilon
* @requires vm.bits == "32"
* @library /test/lib /
* @summary Tests that performance counters for metaspace and compressed class
* space exists and works.
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.metaspace.TestMetaspacePerfCounters
*/
public class TestMetaspacePerfCounters {
public static Class<?> fooClass = null;
private static final String[] counterNames = {"minCapacity", "maxCapacity", "capacity", "used"};

View File

@ -34,13 +34,27 @@ import gc.testlibrary.PerfCounters;
* @bug 8023476
* @library /test/lib /
* @requires vm.gc.Serial
* @requires vm.bits == "64"
* @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
* report the same data.
* @modules java.base/jdk.internal.misc
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xlog:class+load,class+unload=trace -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xlog:class+load,class+unload=trace -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
* @run main/othervm -Xlog:class+load,class+unload=trace -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
* @run main/othervm -Xlog:class+load,class+unload=trace -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
*/
/* @test TestPerfCountersAndMemoryPools
* @bug 8023476
* @library /test/lib /
* @requires vm.gc.Serial
* @requires vm.bits == "32"
* @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
* report the same data.
* @modules java.base/jdk.internal.misc
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run main/othervm -Xlog:class+load,class+unload=trace -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
*/
public class TestPerfCountersAndMemoryPools {
public static void main(String[] args) throws Exception {

View File

@ -41,20 +41,54 @@
*/
/*
* @test id=default
* @test id=default-debug
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
* @requires vm.gc.Shenandoah
* @requires vm.debug
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahVerify -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
* -XX:+ShenandoahVerify -XX:+ShenandoahVerifyOptoBarriers
* TestVerifyJCStress
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* -XX:+ShenandoahVerify -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
* -XX:+ShenandoahVerify -XX:+ShenandoahVerifyOptoBarriers
* TestVerifyJCStress
*/
/*
* @test id=default
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
* @requires vm.gc.Shenandoah
* @requires !vm.debug
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahVerify
* TestVerifyJCStress
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* -XX:+ShenandoahVerify
* TestVerifyJCStress
*/
/*
* @test id=iu-debug
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
* @requires vm.gc.Shenandoah
* @requires vm.debug
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
* -XX:+ShenandoahVerify -XX:+ShenandoahVerifyOptoBarriers
* TestVerifyJCStress
*/
@ -62,20 +96,30 @@
* @test id=iu
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
* @requires vm.gc.Shenandoah
* @required !vm.debug
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
* -XX:+ShenandoahVerify -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
* -XX:+ShenandoahVerify
* TestVerifyJCStress
*/
/*
* @test id=iu-c1
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
* @requires vm.gc.Shenandoah
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
* -XX:+ShenandoahVerify -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1
* -XX:+ShenandoahVerify -XX:TieredStopAtLevel=1
* TestVerifyJCStress
*/
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.locks.*;

View File

@ -29,7 +29,15 @@
* @library /test/lib
* @run driver TestSelectiveBarrierFlags -Xint
* @run driver TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
* @run driver TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
*/
/* @test
* @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
* of barrier flags
* @requires vm.gc.Shenandoah
* @requires vm.debug
* @library /test/lib
* @run driver TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+ShenandoahVerifyOptoBarriers
*/
import java.util.*;