Skip to content

Commit 8459a70

Browse files
committed
[WIP][GR-40746] Fix prioritization of OSR tasks in compilation queue of Truffle
PullRequest: graal/19494
2 parents d4d0670 + e1fb7ae commit 8459a70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ boolean isHigherPriorityThan(CompilationTask other) {
243243
// Any non-compilation action (e.g. compiler init) is higher priority.
244244
return true;
245245
}
246-
if (this.isOSR && other.isLastTier()) {
247-
return true;
246+
if ((this.isOSR ^ other.isOSR) && this.isLastTier() && other.isLastTier()) {
247+
// Any OSR task has higher priority than any non-OSR last tier task
248+
return this.isOSR;
248249
}
249250
int tier = tier();
250251
if (engineData.traversingFirstTierPriority && tier != other.tier()) {

0 commit comments

Comments
 (0)