22 */ |
22 */ |
23 |
23 |
24 import com.sun.management.HotSpotDiagnosticMXBean; |
24 import com.sun.management.HotSpotDiagnosticMXBean; |
25 import com.sun.management.VMOption; |
25 import com.sun.management.VMOption; |
26 import sun.hotspot.WhiteBox; |
26 import sun.hotspot.WhiteBox; |
|
27 import sun.hotspot.code.NMethod; |
27 import sun.management.ManagementFactoryHelper; |
28 import sun.management.ManagementFactoryHelper; |
28 |
29 |
29 import java.lang.reflect.Constructor; |
30 import java.lang.reflect.Constructor; |
30 import java.lang.reflect.Executable; |
31 import java.lang.reflect.Executable; |
31 import java.lang.reflect.Method; |
32 import java.lang.reflect.Method; |
253 WHITE_BOX.deoptimizeMethod(method, false); |
254 WHITE_BOX.deoptimizeMethod(method, false); |
254 } |
255 } |
255 } |
256 } |
256 |
257 |
257 protected final int getCompLevel() { |
258 protected final int getCompLevel() { |
258 return WHITE_BOX.getMethodCompilationLevel(method, testCase.isOsr()); |
259 NMethod nm = NMethod.get(method, testCase.isOsr()); |
|
260 return nm == null ? COMP_LEVEL_NONE : nm.comp_level; |
259 } |
261 } |
260 |
262 |
261 protected final boolean isCompilable() { |
263 protected final boolean isCompilable() { |
262 return WHITE_BOX.isMethodCompilable(method, COMP_LEVEL_ANY, |
264 return WHITE_BOX.isMethodCompilable(method, COMP_LEVEL_ANY, |
263 testCase.isOsr()); |
265 testCase.isOsr()); |