8011971: WB API doesn't accept j.l.reflect.Constructor

Reviewed-by: kvn, vlivanov
This commit is contained in:
Igor Ignatyev 2013-04-16 10:04:01 -07:00
parent 23e34191a6
commit 33e3f6b59b
11 changed files with 535 additions and 175 deletions

View file

@ -27,20 +27,34 @@
* @build DeoptimizeAllTest
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DeoptimizeAllTest
* @summary testing of WB::deoptimizeAll()
* @author igor.ignatyev@oracle.com
*/
public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
public static void main(String[] args) throws Exception {
// to prevent inlining #method into #compile()
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
new DeoptimizeAllTest().runTest();
for (TestCase test : TestCase.values()) {
new DeoptimizeAllTest(test).runTest();
}
}
public DeoptimizeAllTest(TestCase testCase) {
super(testCase);
// to prevent inlining of #method
WHITE_BOX.testSetDontInlineMethod(method, true);
}
/**
* Tests {@code WB::deoptimizeAll()} by calling it after
* compilation and checking that method isn't compiled.
*
* @throws Exception if one of the checks fails.
*/
@Override
protected void test() throws Exception {
compile();
checkCompiled(METHOD);
checkCompiled();
WHITE_BOX.deoptimizeAll();
checkNotCompiled(METHOD);
checkNotCompiled();
}
}