Skip to content

Commit 744286e

Browse files
committed
[GR-66892] Don't share the speculation log between splits of the same call target, it produces false positives in the deopt cycle detection.
PullRequest: graal/21689
2 parents 2f88847 + 8ec81da commit 744286e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,14 @@ public Class<?> getType() {
369369
protected OptimizedCallTarget(OptimizedCallTarget sourceCallTarget, RootNode rootNode) {
370370
assert sourceCallTarget == null || sourceCallTarget.sourceCallTarget == null : "Cannot create a clone of a cloned CallTarget";
371371
this.sourceCallTarget = sourceCallTarget;
372-
this.speculationLog = sourceCallTarget != null ? sourceCallTarget.getSpeculationLog() : null;
372+
/*
373+
* Don't share the source's speculation log. Different splits of the same call target can be
374+
* very different. Moreover, the signatures used for speculations of the deopt cycle
375+
* detection algorithm don't include call target ids, so two same compilations of two
376+
* different splits of the same call target would produce a false positive if the
377+
* speculation log was shared.
378+
*/
379+
this.speculationLog = null;
373380
this.rootNode = rootNode;
374381
this.engine = OptimizedTVMCI.getEngineData(rootNode);
375382
this.resetCompilationProfile();

0 commit comments

Comments
 (0)