Skip to content

Commit e1fb7ae

Browse files
committed
[GR-40746] fix prioritization of OSR tasks in compilation queue of Truffle
1 parent 3f6c059 commit e1fb7ae

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

Lines changed: 3 additions & 2 deletions
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)