< prev index next >

test/compiler/testlibrary/CompilerUtils.java

Print this page

        

@@ -21,10 +21,11 @@
  * questions.
  */
 
 package compiler.testlibrary;
 
+import java.util.Arrays;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.Platform;
 import java.util.stream.IntStream;
 import sun.hotspot.WhiteBox;
 

@@ -58,6 +59,16 @@
                 return new int[]{1};
             }
         }
         return new int[0];
     }
+
+    /**
+     * Returns maximum compilation level available
+     * @return an int value representing maximum compilation level available
+     */
+    public static int getMaxCompilationLevel() {
+        return Arrays.stream(getAvailableCompilationLevels())
+                .max()
+                .getAsInt();
+    }
 }
< prev index next >