author | jiangli |
Wed, 27 Sep 2017 17:55:20 -0400 | |
changeset 47548 | 664b9d44db74 |
parent 47216 | 71c04702a3d5 |
child 48002 | 0c88cd009b5f |
permissions | -rw-r--r-- |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
1 |
/* |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40059
diff
changeset
|
2 |
* Copyright (c) 2014, 2016, 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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
24 |
/* |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
25 |
* @test DeoptimizeFramesTest |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
26 |
* @bug 8028595 |
40059 | 27 |
* @summary testing of WB::deoptimizeFrames() |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40059
diff
changeset
|
28 |
* @library /test/lib / |
38152
80e5da81fb2c
8154258: [TESTBUG] Various serviceability tests fail compilation
dsamersoff
parents:
38025
diff
changeset
|
29 |
* @modules java.base/jdk.internal.misc |
40059 | 30 |
* java.management |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40059
diff
changeset
|
31 |
* @build sun.hotspot.WhiteBox |
38025
5ed9ce1e4a2f
8151880: EnqueueMethodForCompilationTest.java still fails to compile method
neliasso
parents:
34185
diff
changeset
|
32 |
* @run driver ClassFileInstaller sun.hotspot.WhiteBox |
40059 | 33 |
* sun.hotspot.WhiteBox$WhiteBoxPermission |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
34 |
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
38025
5ed9ce1e4a2f
8151880: EnqueueMethodForCompilationTest.java still fails to compile method
neliasso
parents:
34185
diff
changeset
|
35 |
* -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay |
40059 | 36 |
* -XX:CompileCommand=compileonly,compiler.whitebox.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 |
40059 | 38 |
* compiler.whitebox.DeoptimizeFramesTest true |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
39 |
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
38025
5ed9ce1e4a2f
8151880: EnqueueMethodForCompilationTest.java still fails to compile method
neliasso
parents:
34185
diff
changeset
|
40 |
* -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay |
40059 | 41 |
* -XX:CompileCommand=compileonly,compiler.whitebox.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 |
40059 | 43 |
* compiler.whitebox.DeoptimizeFramesTest false |
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
44 |
*/ |
40059 | 45 |
|
46 |
package compiler.whitebox; |
|
47 |
||
48 |
import jdk.test.lib.Asserts; |
|
49 |
import sun.hotspot.code.NMethod; |
|
50 |
||
28199
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
51 |
import java.lang.reflect.Executable; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
52 |
import java.util.concurrent.Callable; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
53 |
import java.util.concurrent.Phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
54 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
55 |
public class DeoptimizeFramesTest extends CompilerWhiteBoxTest { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
56 |
private final boolean makeNotEntrant; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
57 |
private final Phaser phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
58 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
59 |
private DeoptimizeFramesTest(boolean makeNotEntrant, Phaser phaser) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
60 |
super(new TestCaseImpl(phaser)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
61 |
// to prevent inlining of #method |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
62 |
WHITE_BOX.testSetDontInlineMethod(method, true); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
63 |
this.makeNotEntrant = makeNotEntrant; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
64 |
this.phaser = phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
65 |
System.out.printf("DeoptimizeFramesTest(makeNotEntrant = %b)%n", |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
66 |
makeNotEntrant); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
69 |
public static void main(String[] args) throws Exception { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
70 |
Asserts.assertEQ(args.length, 1, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
71 |
"[TESTBUG] args should contain 1 element"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
72 |
new DeoptimizeFramesTest(Boolean.valueOf(args[0]), new Phaser()).runTest(); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
75 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
76 |
protected void test() throws Exception { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
77 |
compile(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
78 |
checkCompiled(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
79 |
NMethod nm = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
80 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
81 |
WHITE_BOX.deoptimizeFrames(makeNotEntrant); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
82 |
// #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
|
83 |
checkCompiled(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
84 |
NMethod nm2 = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
85 |
Asserts.assertEQ(nm.compile_id, nm2.compile_id, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
86 |
"should be the same nmethod"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
87 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
88 |
phaser.register(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
89 |
Thread t = new Thread(() -> compile(1)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
90 |
t.start(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
91 |
// pass 1st phase, #method is on stack |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
92 |
int p = phaser.arriveAndAwaitAdvance(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
93 |
WHITE_BOX.deoptimizeFrames(makeNotEntrant); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
94 |
// pass 2nd phase, #method can exit |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
95 |
phaser.awaitAdvance(phaser.arriveAndDeregister()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
96 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
97 |
try { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
98 |
t.join(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
99 |
} catch (InterruptedException e) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
100 |
throw new Error("method '" + method + "' is still executing", e); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
103 |
// invoke one more time to recompile not entrant if any |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
104 |
compile(1); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
105 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
106 |
nm2 = NMethod.get(method, testCase.isOsr()); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
107 |
if (makeNotEntrant) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
108 |
if (nm2 != null) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
109 |
Asserts.assertNE(nm.compile_id, nm2.compile_id, |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
110 |
String.format("compilation %d can't be available", nm.compile_id)); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
111 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
112 |
} else { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
113 |
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
|
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
118 |
private static class TestCaseImpl implements TestCase { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
119 |
private static final Executable EXECUTABLE; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
120 |
static { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
121 |
try { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
122 |
EXECUTABLE = TestCaseImpl.class.getDeclaredMethod("method"); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
123 |
} catch (NoSuchMethodException e) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
124 |
throw new Error("[TESTBUG] method not found", e); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
128 |
private final Phaser phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
129 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
130 |
public TestCaseImpl(Phaser phaser) { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
131 |
this.phaser = phaser; |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
132 |
phaser.register(); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
135 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
136 |
public String name() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
137 |
return "2phases"; |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
140 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
141 |
public Executable getExecutable() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
142 |
return EXECUTABLE; |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
145 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
146 |
public Callable<Integer> getCallable() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
147 |
return () -> { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
148 |
return method(); |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
152 |
@Override |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
153 |
public boolean isOsr() { |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
154 |
return false; |
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 |
|
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
157 |
private int method() { |
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 |
phaser.arriveAndAwaitAdvance(); |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
160 |
return 0; |
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 |
} |
b7fb20a745f7
8028595: WhiteBox API for stress testing of TieredCompilation
iignatyev
parents:
diff
changeset
|
163 |
} |