diff test/compiler/whitebox/CompilerWhiteBoxTest.java @ 17817:4abb719c5620

8038240: new WB API to get nmethod Reviewed-by: morris, kvn
author iignatyev
date Thu, 27 Mar 2014 11:17:26 +0400
parents d559dbbded7a
children 5e6f84e7a942
line wrap: on
line diff
--- a/test/compiler/whitebox/CompilerWhiteBoxTest.java	Thu Mar 27 17:29:41 2014 +0400
+++ b/test/compiler/whitebox/CompilerWhiteBoxTest.java	Thu Mar 27 11:17:26 2014 +0400
@@ -24,6 +24,7 @@
 import com.sun.management.HotSpotDiagnosticMXBean;
 import com.sun.management.VMOption;
 import sun.hotspot.WhiteBox;
+import sun.hotspot.code.NMethod;
 import sun.management.ManagementFactoryHelper;
 
 import java.lang.reflect.Constructor;
@@ -255,7 +256,8 @@
     }
 
     protected final int getCompLevel() {
-        return WHITE_BOX.getMethodCompilationLevel(method, testCase.isOsr());
+        NMethod nm = NMethod.get(method, testCase.isOsr());
+        return nm == null ? COMP_LEVEL_NONE : nm.comp_level;
     }
 
     protected final boolean isCompilable() {