author | chegar |
Tue, 22 Mar 2016 15:26:07 +0000 | |
changeset 36694 | 182a5e7a519e |
parent 34185 | ee71c590a456 |
child 38025 | 5ed9ce1e4a2f |
permissions | -rw-r--r-- |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
1 |
/* |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
29475
diff
changeset
|
2 |
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
4 |
* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
8 |
* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
13 |
* accompanied this code). |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
14 |
* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
18 |
* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
21 |
* questions. |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
22 |
*/ |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
23 |
|
34155
8d9e0cbf93a2
8138689: use package for /compiler/whitebox common classes
dpochepk
parents:
30604
diff
changeset
|
24 |
import compiler.whitebox.CompilerWhiteBoxTest; |
8d9e0cbf93a2
8138689: use package for /compiler/whitebox common classes
dpochepk
parents:
30604
diff
changeset
|
25 |
|
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
26 |
/* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
27 |
* @test DeoptimizeFramesTest |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
28 |
* @bug 8028595 |
34185 | 29 |
* @library /testlibrary /test/lib / |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
29475
diff
changeset
|
30 |
* @modules java.management |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
31 |
* @build DeoptimizeFramesTest |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
32 |
* @run main ClassFileInstaller sun.hotspot.WhiteBox |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
33 |
* sun.hotspot.WhiteBox$WhiteBoxPermission |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
34 |
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
35 |
* -XX:+WhiteBoxAPI -Xmixed |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
36 |
* -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method |
30192
87a5d3461a1e
8075488: compiler/whitebox/DeoptimizeFramesTest fails with exit code 1 due to unrecognized VM option -XX:+IgnoreUnexpectedVMOptions
tpivovarova
parents:
29475
diff
changeset
|
37 |
* -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot |
29475
70342c6ce8f7
8073860: [TESTBUG] compiler/whitebox/DeoptimizeFramesTest fails with exit code 1
iignatyev
parents:
28929
diff
changeset
|
38 |
* DeoptimizeFramesTest true |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
39 |
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
40 |
* -XX:+WhiteBoxAPI -Xmixed |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
41 |
* -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method |
30192
87a5d3461a1e
8075488: compiler/whitebox/DeoptimizeFramesTest fails with exit code 1 due to unrecognized VM option -XX:+IgnoreUnexpectedVMOptions
tpivovarova
parents:
29475
diff
changeset
|
42 |
* -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot |
29475
70342c6ce8f7
8073860: [TESTBUG] compiler/whitebox/DeoptimizeFramesTest fails with exit code 1
iignatyev
parents:
28929
diff
changeset
|
43 |
* DeoptimizeFramesTest false |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
44 |
* @summary testing of WB::deoptimizeFrames() |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
45 |
*/ |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
46 |
import java.lang.reflect.Executable; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
47 |
import java.util.concurrent.Callable; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
48 |
import java.util.concurrent.Phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
49 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
50 |
import sun.hotspot.code.NMethod; |
30604
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
30216
diff
changeset
|
51 |
import jdk.test.lib.Asserts; |
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
30216
diff
changeset
|
52 |
import jdk.test.lib.InfiniteLoop; |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
53 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
54 |
public class DeoptimizeFramesTest extends CompilerWhiteBoxTest { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
55 |
private final boolean makeNotEntrant; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
56 |
private final Phaser phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
57 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
58 |
private DeoptimizeFramesTest(boolean makeNotEntrant, Phaser phaser) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
59 |
super(new TestCaseImpl(phaser)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
60 |
// to prevent inlining of #method |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
61 |
WHITE_BOX.testSetDontInlineMethod(method, true); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
62 |
this.makeNotEntrant = makeNotEntrant; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
63 |
this.phaser = phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
64 |
System.out.printf("DeoptimizeFramesTest(makeNotEntrant = %b)%n", |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
65 |
makeNotEntrant); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
66 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
67 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
68 |
public static void main(String[] args) throws Exception { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
69 |
Asserts.assertEQ(args.length, 1, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
70 |
"[TESTBUG] args should contain 1 element"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
71 |
new DeoptimizeFramesTest(Boolean.valueOf(args[0]), new Phaser()).runTest(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
72 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
73 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
74 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
75 |
protected void test() throws Exception { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
76 |
compile(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
77 |
checkCompiled(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
78 |
NMethod nm = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
79 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
80 |
WHITE_BOX.deoptimizeFrames(makeNotEntrant); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
81 |
// #method should still be compiled, since it didn't have frames on stack |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
82 |
checkCompiled(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
83 |
NMethod nm2 = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
84 |
Asserts.assertEQ(nm.compile_id, nm2.compile_id, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
85 |
"should be the same nmethod"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
86 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
87 |
phaser.register(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
88 |
Thread t = new Thread(() -> compile(1)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
89 |
t.start(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
90 |
// pass 1st phase, #method is on stack |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
91 |
int p = phaser.arriveAndAwaitAdvance(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
92 |
WHITE_BOX.deoptimizeFrames(makeNotEntrant); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
93 |
// pass 2nd phase, #method can exit |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
94 |
phaser.awaitAdvance(phaser.arriveAndDeregister()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
95 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
96 |
try { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
97 |
t.join(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
98 |
} catch (InterruptedException e) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
99 |
throw new Error("method '" + method + "' is still executing", e); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
100 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
101 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
102 |
// invoke one more time to recompile not entrant if any |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
103 |
compile(1); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
104 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
105 |
nm2 = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
106 |
if (makeNotEntrant) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
107 |
if (nm2 != null) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
108 |
Asserts.assertNE(nm.compile_id, nm2.compile_id, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
109 |
String.format("compilation %d can't be available", nm.compile_id)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
110 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
111 |
} else { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
112 |
Asserts.assertEQ(nm.compile_id, nm2.compile_id, "should be the same nmethod"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
113 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
114 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
115 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
116 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
117 |
private static class TestCaseImpl implements TestCase { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
118 |
private static final Executable EXECUTABLE; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
119 |
static { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
120 |
try { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
121 |
EXECUTABLE = TestCaseImpl.class.getDeclaredMethod("method"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
122 |
} catch (NoSuchMethodException e) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
123 |
throw new Error("[TESTBUG] method not found", e); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
124 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
125 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
126 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
127 |
private final Phaser phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
128 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
129 |
public TestCaseImpl(Phaser phaser) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
130 |
this.phaser = phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
131 |
phaser.register(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
132 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
133 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
134 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
135 |
public String name() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
136 |
return "2phases"; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
137 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
138 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
139 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
140 |
public Executable getExecutable() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
141 |
return EXECUTABLE; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
142 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
143 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
144 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
145 |
public Callable<Integer> getCallable() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
146 |
return () -> { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
147 |
return method(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
148 |
}; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
149 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
150 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
151 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
152 |
public boolean isOsr() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
153 |
return false; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
154 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
155 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
156 |
private int method() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
157 |
phaser.arriveAndAwaitAdvance(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
158 |
phaser.arriveAndAwaitAdvance(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
159 |
return 0; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
160 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
161 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
162 |
} |