--- old/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java 2018-10-19 10:54:10.000000000 -0400 +++ new/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java 2018-10-19 10:54:09.000000000 -0400 @@ -34,7 +34,8 @@ * @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 */ @@ -86,8 +87,21 @@ public static void main(String[] args) { switch (args[0]) { case "G1": - 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"})); + 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"}),