< prev index next >
test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java
Print this page
@@ -32,11 +32,12 @@
* @summary Tests that GarbageCollectorMXBeans and GC MemoryPools are created.
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @requires vm.gc == null
- * @run main/othervm -XX:+UseG1GC TestMemoryMXBeansAndPoolsPresence G1
+ * @run main/othervm -XX:+UseG1GC -XX:-G1UseLegacyMonitoring TestMemoryMXBeansAndPoolsPresence G1 NoLegacy
+ * @run main/othervm -XX:+UseG1GC -XX:+G1UseLegacyMonitoring TestMemoryMXBeansAndPoolsPresence G1 Legacy
* @run main/othervm -XX:+UseParallelGC TestMemoryMXBeansAndPoolsPresence Parallel
* @run main/othervm -XX:+UseSerialGC TestMemoryMXBeansAndPoolsPresence Serial
*/
/* @test TestMemoryMXBeansAndPoolsPresenceCMS
@@ -84,12 +85,25 @@
}
public static void main(String[] args) {
switch (args[0]) {
case "G1":
+ if (args[1].equals("Legacy")) {
test(new GCBeanDescription("G1 Young Generation", new String[] {"G1 Eden Space", "G1 Survivor Space", "G1 Old Gen"}),
new GCBeanDescription("G1 Old Generation", new String[] {"G1 Eden Space", "G1 Survivor Space", "G1 Old Gen"}));
+ } else {
+ test(new GCBeanDescription("G1 Young",
+ new String[] {"G1 Eden Space", "G1 Survivor Space", "G1 Humongous Space"}),
+ new GCBeanDescription("G1 Mixed",
+ new String[] {"G1 Eden Space", "G1 Survivor Space", "G1 Humongous Space",
+ "G1 Old Space"}),
+ new GCBeanDescription("G1 Full",
+ new String[] {"G1 Eden Space", "G1 Survivor Space", "G1 Humongous Space",
+ "G1 Archive Space", "G1 Old Space"}),
+ new GCBeanDescription("G1 Concurrent Cycle",
+ new String[] {"G1 Humongous Space", "G1 Old Space"}));
+ }
break;
case "CMS":
test(new GCBeanDescription("ParNew", new String[] {"Par Eden Space", "Par Survivor Space"}),
new GCBeanDescription("ConcurrentMarkSweep", new String[] {"Par Eden Space", "Par Survivor Space", "CMS Old Gen"}));
break;
< prev index next >