Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
17816:3829d0343db0 | 17817:4abb719c5620 |
---|---|
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()); |