提交 f6a57797 编写于 作者: J jwilhelm

8062537: [TESTBUG] Conflicting GC combinations in hotspot tests

Reviewed-by: tschatzl, jwilhelm
上级 b5ceee05
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 8027751 * @bug 8027751
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary C1 crashes generating G1 post-barrier in Unsafe.getAndSetObject() intrinsic because of the new value spill * @summary C1 crashes generating G1 post-barrier in Unsafe.getAndSetObject() intrinsic because of the new value spill
* @run main/othervm -XX:+UseG1GC C1ObjectSpillInLogicOp * @run main/othervm -XX:+UseG1GC C1ObjectSpillInLogicOp
* *
......
/* /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test Test6581734.java * @test Test6581734.java
* @bug 6581734 * @bug 6581734
* @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
* @summary CMS Old Gen's collection usage is zero after GC which is incorrect * @summary CMS Old Gen's collection usage is zero after GC which is incorrect
* @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC Test6581734 * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC Test6581734
* *
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test TestSystemGC * @test TestSystemGC
* @key gc * @key gc
* @requires vm.gc=="null"
* @summary Runs System.gc() with different flags. * @summary Runs System.gc() with different flags.
* @run main/othervm TestSystemGC * @run main/othervm TestSystemGC
* @run main/othervm -XX:+UseSerialGC TestSystemGC * @run main/othervm -XX:+UseSerialGC TestSystemGC
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* @bug 8024396 * @bug 8024396
* @key gc * @key gc
* @key regression * @key regression
* @requires vm.gc=="null"
* @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
* @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages
* @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,11 +25,12 @@ ...@@ -25,11 +25,12 @@
* @test TestG1HeapRegionSize * @test TestG1HeapRegionSize
* @key gc * @key gc
* @bug 8021879 * @bug 8021879
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Verify that the flag G1HeapRegionSize is updated properly * @summary Verify that the flag G1HeapRegionSize is updated properly
* @run main/othervm -Xmx64m TestG1HeapRegionSize 1048576 * @run main/othervm -Xmx64m TestG1HeapRegionSize 1048576
* @run main/othervm -XX:G1HeapRegionSize=2m -Xmx64m TestG1HeapRegionSize 2097152 * @run main/othervm -XX:G1HeapRegionSize=2m -Xmx64m -XX:+UseG1GC TestG1HeapRegionSize 2097152
* @run main/othervm -XX:G1HeapRegionSize=3m -Xmx64m TestG1HeapRegionSize 2097152 * @run main/othervm -XX:G1HeapRegionSize=3m -Xmx64m -XX:+UseG1GC TestG1HeapRegionSize 2097152
* @run main/othervm -XX:G1HeapRegionSize=64m -Xmx256m TestG1HeapRegionSize 33554432 * @run main/othervm -XX:G1HeapRegionSize=64m -Xmx256m -XX:+UseG1GC TestG1HeapRegionSize 33554432
*/ */
import sun.management.ManagementFactoryHelper; import sun.management.ManagementFactoryHelper;
...@@ -41,14 +42,8 @@ public class TestG1HeapRegionSize { ...@@ -41,14 +42,8 @@ public class TestG1HeapRegionSize {
public static void main(String[] args) { public static void main(String[] args) {
HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean(); HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean();
VMOption option = diagnostic.getVMOption("UseG1GC");
if (option.getValue().equals("false")) {
System.out.println("Skipping this test. It is only a G1 test.");
return;
}
String expectedValue = getExpectedValue(args); String expectedValue = getExpectedValue(args);
option = diagnostic.getVMOption("G1HeapRegionSize"); VMOption option = diagnostic.getVMOption("G1HeapRegionSize");
if (!expectedValue.equals(option.getValue())) { if (!expectedValue.equals(option.getValue())) {
throw new RuntimeException("Wrong value for G1HeapRegionSize. Expected " + expectedValue + " but got " + option.getValue()); throw new RuntimeException("Wrong value for G1HeapRegionSize. Expected " + expectedValue + " but got " + option.getValue());
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @key gc * @key gc
* @bug 8060467 * @bug 8060467
* @author filipp.zhinkin@oracle.com, john.coomes@oracle.com * @author filipp.zhinkin@oracle.com, john.coomes@oracle.com
* @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
* @summary Run CMS with PLAB resizing disabled and a small OldPLABSize * @summary Run CMS with PLAB resizing disabled and a small OldPLABSize
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -XX:+PrintGCDetails DisableResizePLAB * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -XX:+PrintGCDetails DisableResizePLAB
*/ */
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/** /**
* @test TestHumongousShrinkHeap * @test TestHumongousShrinkHeap
* @bug 8036025 8056043 * @bug 8036025 8056043
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Verify that heap shrinks after GC in the presence of fragmentation * @summary Verify that heap shrinks after GC in the presence of fragmentation
* due to humongous objects * due to humongous objects
* @library /testlibrary * @library /testlibrary
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test TestRegionAlignment.java * @test TestRegionAlignment.java
* @bug 8013791 * @bug 8013791
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Make sure that G1 ergonomics pick a heap size that is aligned with the region size * @summary Make sure that G1 ergonomics pick a heap size that is aligned with the region size
* @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:MaxRAM=555m TestRegionAlignment * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:MaxRAM=555m TestRegionAlignment
* *
......
...@@ -70,9 +70,7 @@ public class TestShrinkAuxiliaryData { ...@@ -70,9 +70,7 @@ public class TestShrinkAuxiliaryData {
printTestInfo(maxCacheSize); printTestInfo(maxCacheSize);
vmOpts.add("-XX:G1ConcRSLogCacheSize=" + RSetCacheSize); vmOpts.add("-XX:G1ConcRSLogCacheSize=" + RSetCacheSize);
vmOpts.addAll(Arrays.asList(Utils.getTestJavaOpts()));
vmOpts.addAll(Arrays.asList(Utils.getFilteredTestJavaOpts(
ShrinkAuxiliaryDataTest.prohibitedVmOptions)));
// for 32 bits ObjectAlignmentInBytes is not a option // for 32 bits ObjectAlignmentInBytes is not a option
if (Platform.is32bit()) { if (Platform.is32bit()) {
...@@ -272,16 +270,5 @@ public class TestShrinkAuxiliaryData { ...@@ -272,16 +270,5 @@ public class TestShrinkAuxiliaryData {
private static final int REGIONS_TO_ALLOCATE = 5; private static final int REGIONS_TO_ALLOCATE = 5;
private static final int NUM_OBJECTS_PER_REGION = 10; private static final int NUM_OBJECTS_PER_REGION = 10;
private static final int NUM_LINKS = 20; // how many links create for each object private static final int NUM_LINKS = 20; // how many links create for each object
private static final String[] prohibitedVmOptions = {
// remove this when @requires option will be on duty
"-XX:\\+UseParallelGC",
"-XX:\\+UseSerialGC",
"-XX:\\+UseConcMarkSweepGC",
"-XX:\\+UseParallelOldGC",
"-XX:\\+UseParNewGC",
"-Xconcgc",
"-Xincgc"
};
} }
} }
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData05 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData05
* @run driver/timeout=720 TestShrinkAuxiliaryData05 * @run driver/timeout=720 TestShrinkAuxiliaryData05
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData10 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData10
* @run driver/timeout=720 TestShrinkAuxiliaryData10 * @run driver/timeout=720 TestShrinkAuxiliaryData10
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData15 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData15
* @run driver/timeout=720 TestShrinkAuxiliaryData15 * @run driver/timeout=720 TestShrinkAuxiliaryData15
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData20 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData20
* @run driver/timeout=720 TestShrinkAuxiliaryData20 * @run driver/timeout=720 TestShrinkAuxiliaryData20
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData25 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData25
* @run driver/timeout=720 TestShrinkAuxiliaryData25 * @run driver/timeout=720 TestShrinkAuxiliaryData25
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 8038423 * @bug 8038423
* @summary Checks that decommitment occurs for JVM with different * @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData30 * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData30
* @run driver/timeout=720 TestShrinkAuxiliaryData30 * @run driver/timeout=720 TestShrinkAuxiliaryData30
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test TestShrinkToOneRegion.java * @test TestShrinkToOneRegion.java
* @bug 8013872 * @bug 8013872
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Shrinking the heap down to one region used to hit an assert * @summary Shrinking the heap down to one region used to hit an assert
* @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -Xmx256m TestShrinkToOneRegion * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -Xmx256m TestShrinkToOneRegion
* *
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* /*
* @test G1AddMetaspaceDependency * @test G1AddMetaspaceDependency
* @bug 8010196 * @bug 8010196
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Checks that we don't get locking problems when adding metaspace dependencies with the G1 update buffer monitor * @summary Checks that we don't get locking problems when adding metaspace dependencies with the G1 update buffer monitor
* @run main/othervm -XX:+UseG1GC -XX:G1UpdateBufferSize=1 G1AddMetaspaceDependency * @run main/othervm -XX:+UseG1GC -XX:G1UpdateBufferSize=1 G1AddMetaspaceDependency
*/ */
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ import static com.oracle.java.testlibrary.Asserts.*; ...@@ -29,6 +29,7 @@ import static com.oracle.java.testlibrary.Asserts.*;
/* @test TestMetaspacePerfCounters /* @test TestMetaspacePerfCounters
* @bug 8014659 * @bug 8014659
* @requires vm.gc=="null"
* @library /testlibrary * @library /testlibrary
* @summary Tests that performance counters for metaspace and compressed class * @summary Tests that performance counters for metaspace and compressed class
* space exists and works. * space exists and works.
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,6 +30,7 @@ import static com.oracle.java.testlibrary.Asserts.*; ...@@ -30,6 +30,7 @@ import static com.oracle.java.testlibrary.Asserts.*;
/* @test TestPerfCountersAndMemoryPools /* @test TestPerfCountersAndMemoryPools
* @bug 8023476 * @bug 8023476
* @library /testlibrary * @library /testlibrary
* @requires vm.gc=="Serial" | vm.gc=="null"
* @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace * @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
* report the same data. * report the same data.
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册