test/lib/testlibrary/jdk/testlibrary/Utils.java

Print this page

        

@@ -124,11 +124,14 @@
      * Removes any options matching: -XX:(+/-)Use*GC
      * Used when a test need to set its own GC version. Then any
      * GC specified by the framework must first be removed.
      * @return A copy of given opts with all GC options removed.
      */
-    private static final Pattern useGcPattern = Pattern.compile("\\-XX\\:[\\+\\-]Use.+GC");
+    private static final Pattern useGcPattern = Pattern.compile(
+            "(?:\\-XX\\:[\\+\\-]Use.+GC)"
+            + "|(?:\\-Xconcgc)"
+            + "|(?:\\-Xincgc)");
     public static List<String> removeGcOpts(List<String> opts) {
         List<String> optsWithoutGC = new ArrayList<String>();
         for (String opt : opts) {
             if (useGcPattern.matcher(opt).matches()) {
                 System.out.println("removeGcOpts: removed " + opt);