< prev index next >

test/compiler/testlibrary/CompilerUtils.java

Print this page

        

*** 21,30 **** --- 21,31 ---- * 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,63 **** --- 59,74 ---- 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 >