comparison test/compiler/whitebox/ClearMethodStateTest.java @ 12073:f99558245e5c

8022832: Add WB APIs for OSR compilation Reviewed-by: kvn
author iignatyev
date Wed, 14 Aug 2013 23:50:23 +0400
parents 11237ee74aae
children f9a4b59ae350
comparison
equal deleted inserted replaced
12072:6c72125a2f40 12073:f99558245e5c
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /* 24 /*
25 * @test ClearMethodStateTest 25 * @test ClearMethodStateTest
26 * @bug 8006683 8007288 8022832
26 * @library /testlibrary /testlibrary/whitebox 27 * @library /testlibrary /testlibrary/whitebox
27 * @build ClearMethodStateTest 28 * @build ClearMethodStateTest
28 * @run main ClassFileInstaller sun.hotspot.WhiteBox 29 * @run main ClassFileInstaller sun.hotspot.WhiteBox
29 * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* ClearMethodStateTest 30 * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* ClearMethodStateTest
30 * @summary testing of WB::clearMethodState() 31 * @summary testing of WB::clearMethodState()
57 checkNotCompiled(); 58 checkNotCompiled();
58 compile(); 59 compile();
59 WHITE_BOX.clearMethodState(method); 60 WHITE_BOX.clearMethodState(method);
60 checkCompiled(); 61 checkCompiled();
61 WHITE_BOX.clearMethodState(method); 62 WHITE_BOX.clearMethodState(method);
62 WHITE_BOX.deoptimizeMethod(method); 63 deoptimize();
63 checkNotCompiled(); 64 checkNotCompiled();
64 65
65 66 if (testCase.isOsr) {
67 // part test isn't applicable for OSR test case
68 return;
69 }
66 if (!TIERED_COMPILATION) { 70 if (!TIERED_COMPILATION) {
67 WHITE_BOX.clearMethodState(method); 71 WHITE_BOX.clearMethodState(method);
68 compile(COMPILE_THRESHOLD); 72 compile(COMPILE_THRESHOLD);
69 checkCompiled(); 73 checkCompiled();
70 74
71 WHITE_BOX.deoptimizeMethod(method); 75 deoptimize();
72 checkNotCompiled(); 76 checkNotCompiled();
73 WHITE_BOX.clearMethodState(method); 77 WHITE_BOX.clearMethodState(method);
74 78
75 // invoke method one less time than needed to compile 79 // invoke method one less time than needed to compile
76 if (COMPILE_THRESHOLD > 1) { 80 if (COMPILE_THRESHOLD > 1) {