Mercurial > hg > truffle
comparison test/compiler/whitebox/DeoptimizeMethodTest.java @ 18058:54bc75c144b0
Merge
author | asaha |
---|---|
date | Thu, 29 May 2014 13:14:25 -0700 |
parents | d559dbbded7a |
children | 92aa6797d639 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
18055:1fa005fb28f5 | 18058:54bc75c144b0 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
25 * @test DeoptimizeMethodTest | 25 * @test DeoptimizeMethodTest |
26 * @bug 8006683 8007288 8022832 | 26 * @bug 8006683 8007288 8022832 |
27 * @library /testlibrary /testlibrary/whitebox | 27 * @library /testlibrary /testlibrary/whitebox |
28 * @build DeoptimizeMethodTest | 28 * @build DeoptimizeMethodTest |
29 * @run main ClassFileInstaller sun.hotspot.WhiteBox | 29 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
30 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* DeoptimizeMethodTest | 30 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* DeoptimizeMethodTest |
31 * @summary testing of WB::deoptimizeMethod() | 31 * @summary testing of WB::deoptimizeMethod() |
32 * @author igor.ignatyev@oracle.com | 32 * @author igor.ignatyev@oracle.com |
33 */ | 33 */ |
34 public class DeoptimizeMethodTest extends CompilerWhiteBoxTest { | 34 public class DeoptimizeMethodTest extends CompilerWhiteBoxTest { |
35 | 35 |
36 public static void main(String[] args) throws Exception { | 36 public static void main(String[] args) throws Exception { |
37 for (TestCase test : TestCase.values()) { | 37 CompilerWhiteBoxTest.main(DeoptimizeMethodTest::new, args); |
38 new DeoptimizeMethodTest(test).runTest(); | |
39 } | |
40 } | 38 } |
41 | 39 |
42 public DeoptimizeMethodTest(TestCase testCase) { | 40 private DeoptimizeMethodTest(TestCase testCase) { |
43 super(testCase); | 41 super(testCase); |
44 // to prevent inlining of #method | 42 // to prevent inlining of #method |
45 WHITE_BOX.testSetDontInlineMethod(method, true); | 43 WHITE_BOX.testSetDontInlineMethod(method, true); |
46 } | 44 } |
47 | 45 |
51 * | 49 * |
52 * @throws Exception if one of the checks fails. | 50 * @throws Exception if one of the checks fails. |
53 */ | 51 */ |
54 @Override | 52 @Override |
55 protected void test() throws Exception { | 53 protected void test() throws Exception { |
56 if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( | 54 if (skipXcompOSR()) { |
57 "compiled ")) { | 55 return; |
58 System.err.printf("Warning: %s is not applicable in %s%n", | |
59 testCase.name(), CompilerWhiteBoxTest.MODE); | |
60 return; | |
61 } | 56 } |
62 compile(); | 57 compile(); |
63 checkCompiled(); | 58 checkCompiled(); |
64 deoptimize(); | 59 deoptimize(); |
65 checkNotCompiled(); | 60 checkNotCompiled(); |