Created
January 23, 2014 09:35
-
-
Save smarr/8575659 to your computer and use it in GitHub Desktop.
Track possible invalidation reasons for debugging.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java | |
index a7088a8..c9d9b8a 100644 | |
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java | |
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java | |
@@ -294,6 +294,7 @@ public final class FrameWithoutBoxing implements VirtualFrame, MaterializedFrame | |
} | |
private boolean resize() { | |
+ System.out.println("FrameWB.resize"); | |
int oldSize = tags.length; | |
int newSize = descriptor.getSize(); | |
if (newSize > oldSize) { | |
diff --git a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java | |
index 49eea97..0afd42f 100644 | |
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java | |
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java | |
@@ -47,6 +47,7 @@ public final class OptimizedAssumption extends AbstractAssumption { | |
@Override | |
public synchronized void invalidate() { | |
if (isValid) { | |
+ System.out.println("Assumption invalidated"); | |
if (dependentInstalledCode != null) { | |
for (WeakReference<InstalledCode> installedCodeReference : dependentInstalledCode) { | |
InstalledCode installedCode = installedCodeReference.get(); | |
diff --git a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java | |
index 313fa00..060b9c3 100644 | |
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java | |
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java | |
@@ -94,6 +94,7 @@ public final class OptimizedCallTarget extends DefaultCallTarget implements Fram | |
try { | |
return installedCode.execute(this, caller, args); | |
} catch (InvalidInstalledCodeException ex) { | |
+ System.out.println("OptCallTarget InvalidInstalledCodeException"); | |
return compiledCodeInvalidated(caller, args); | |
} | |
} else { | |
@@ -111,6 +112,7 @@ public final class OptimizedCallTarget extends DefaultCallTarget implements Fram | |
} | |
private void invalidate() { | |
+ System.out.println("OptCallTarget invalidated"); | |
InstalledCode m = this.installedCode; | |
if (m != null) { | |
CompilerAsserts.neverPartOfCompilation(); | |
@@ -232,6 +234,7 @@ public final class OptimizedCallTarget extends DefaultCallTarget implements Fram | |
@Override | |
public void nodeReplaced() { | |
+ System.out.println("OptCallTarget nodeReplaced"); | |
compilationProfile.reportNodeReplaced(); | |
invalidate(); | |
} | |
diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameSlot.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameSlot.java | |
index 2c64012..c726b3f 100644 | |
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameSlot.java | |
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameSlot.java | |
@@ -58,6 +58,7 @@ public final class FrameSlot implements Cloneable { | |
public void setKind(final FrameSlotKind kind) { | |
if (this.kind != kind) { | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("FrameSlot.setKind: " + identifier.toString()); | |
this.kind = kind; | |
this.descriptor.updateVersion(); | |
} | |
diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultAssumption.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultAssumption.java | |
index b60b4a5..1045eb5 100644 | |
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultAssumption.java | |
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultAssumption.java | |
@@ -41,6 +41,7 @@ public final class DefaultAssumption extends AbstractAssumption { | |
@Override | |
public void invalidate() { | |
+ System.out.println("Assumption invalidated"); | |
isValid = false; | |
} | |
diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java | |
index 56de8ce..34b8066 100644 | |
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java | |
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java | |
@@ -173,6 +173,7 @@ public abstract class Node implements Cloneable { | |
*/ | |
public final <T extends Node> T replace(T newNode, String reason) { | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("replace: " + reason + "."); | |
if (this.getParent() == null) { | |
throw new IllegalStateException("This node cannot be replaced, because it does not yet have a parent."); | |
} | |
diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SlowPathException.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SlowPathException.java | |
index e8ca755..ba5723e 100644 | |
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SlowPathException.java | |
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SlowPathException.java | |
@@ -39,6 +39,7 @@ public class SlowPathException extends Exception { | |
*/ | |
public SlowPathException() { | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("SlowPathException"); | |
} | |
/** | |
@@ -47,6 +48,7 @@ public class SlowPathException extends Exception { | |
public SlowPathException(String message, Throwable cause) { | |
super(message, cause); | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("SlowPathException"); | |
} | |
/** | |
@@ -55,6 +57,7 @@ public class SlowPathException extends Exception { | |
public SlowPathException(String message) { | |
super(message); | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("SlowPathException"); | |
} | |
/** | |
@@ -63,6 +66,7 @@ public class SlowPathException extends Exception { | |
public SlowPathException(Throwable cause) { | |
super(cause); | |
CompilerDirectives.transferToInterpreter(); | |
+ System.out.println("SlowPathException"); | |
} | |
/** | |
diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java | |
index 94db799..aec5000 100644 | |
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java | |
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java | |
@@ -40,6 +40,7 @@ public final class BranchProfile { | |
public void enter() { | |
if (!visited) { | |
CompilerDirectives.transferToInterpreterAndInvalidate(); | |
+ System.out.println("BranchProfile.enter"); | |
visited = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment