Skip to content

Commit 037133e

Browse files
committed
8360783: CTW: Skip deoptimization between tiers
Backport-of: cd6caedd0a3c9ebd4c8c57e64f62b60161c5cd7c
1 parent 8ef7d60 commit 037133e

File tree

1 file changed

+7
-2
lines changed
  • test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw

1 file changed

+7
-2
lines changed

test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,22 @@ public CompileMethodCommand(long classId, Executable method) {
202202

203203
@Override
204204
public final void run() {
205+
// Make sure method is not compiled at any level before starting
206+
// progressive compilations. No deopt in-between tiers is needed,
207+
// as long as we increase the compilation levels one by one.
208+
WHITE_BOX.deoptimizeMethod(method);
209+
205210
int compLevel = Utils.INITIAL_COMP_LEVEL;
206211
if (Utils.TIERED_COMPILATION) {
207212
for (int i = compLevel; i <= Utils.TIERED_STOP_AT_LEVEL; ++i) {
208-
WHITE_BOX.deoptimizeMethod(method);
209213
compileAtLevel(i);
210214
}
211215
} else {
212216
compileAtLevel(compLevel);
213217
}
214218

215-
// Make the method eligible for sweeping sooner
219+
// Ditch all the compiled versions of the code, make the method
220+
// eligible for sweeping sooner.
216221
WHITE_BOX.deoptimizeMethod(method);
217222
}
218223

0 commit comments

Comments
 (0)