Mercurial > hg > truffle
comparison test/compiler/whitebox/DeoptimizeAllTest.java @ 10143:c4af77d20454 hs25-b30
Merge
author | amurillo |
---|---|
date | Fri, 26 Apr 2013 00:29:11 -0700 |
parents | 4b2eebe03f93 |
children | 11237ee74aae |
comparison
equal
deleted
inserted
replaced
10124:d080f5168deb | 10143:c4af77d20454 |
---|---|
25 * @test DeoptimizeAllTest | 25 * @test DeoptimizeAllTest |
26 * @library /testlibrary /testlibrary/whitebox | 26 * @library /testlibrary /testlibrary/whitebox |
27 * @build DeoptimizeAllTest | 27 * @build DeoptimizeAllTest |
28 * @run main ClassFileInstaller sun.hotspot.WhiteBox | 28 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DeoptimizeAllTest | 29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DeoptimizeAllTest |
30 * @summary testing of WB::deoptimizeAll() | |
30 * @author igor.ignatyev@oracle.com | 31 * @author igor.ignatyev@oracle.com |
31 */ | 32 */ |
32 public class DeoptimizeAllTest extends CompilerWhiteBoxTest { | 33 public class DeoptimizeAllTest extends CompilerWhiteBoxTest { |
33 | 34 |
34 public static void main(String[] args) throws Exception { | 35 public static void main(String[] args) throws Exception { |
35 // to prevent inlining #method into #compile() | 36 for (TestCase test : TestCase.values()) { |
36 WHITE_BOX.testSetDontInlineMethod(METHOD, true); | 37 new DeoptimizeAllTest(test).runTest(); |
37 new DeoptimizeAllTest().runTest(); | 38 } |
38 } | 39 } |
39 | 40 |
41 public DeoptimizeAllTest(TestCase testCase) { | |
42 super(testCase); | |
43 // to prevent inlining of #method | |
44 WHITE_BOX.testSetDontInlineMethod(method, true); | |
45 } | |
46 | |
47 /** | |
48 * Tests {@code WB::deoptimizeAll()} by calling it after | |
49 * compilation and checking that method isn't compiled. | |
50 * | |
51 * @throws Exception if one of the checks fails. | |
52 */ | |
53 @Override | |
40 protected void test() throws Exception { | 54 protected void test() throws Exception { |
41 compile(); | 55 compile(); |
42 checkCompiled(METHOD); | 56 checkCompiled(); |
43 WHITE_BOX.deoptimizeAll(); | 57 WHITE_BOX.deoptimizeAll(); |
44 checkNotCompiled(METHOD); | 58 checkNotCompiled(); |
45 } | 59 } |
46 } | 60 } |