changes: build conflict graphs that have line number information of stall sites
authoryeom <yeom>
Sun, 3 Apr 2011 21:13:35 +0000 (21:13 +0000)
committeryeom <yeom>
Sun, 3 Apr 2011 21:13:35 +0000 (21:13 +0000)
Robust/src/Analysis/OoOJava/ConflictGraph.java

index d8e725294a1a1c986c75fabc162dd2c1d0d88b8f..b015625d8685798748a575b46d8f5bfc2f8aea14 100644 (file)
@@ -1,6 +1,7 @@
 package Analysis.OoOJava;
 
 import java.io.BufferedWriter;
+import java.io.File;
 import java.io.FileWriter;
 import java.util.Collection;
 import java.util.HashMap;
@@ -768,7 +769,15 @@ public class ConflictGraph {
       attributes += "label=\"" + node.getID() + "\\n";
 
       if (node.isStallSiteNode()) {
-        attributes += "STALL SITE" + "\\n" + "\"]";
+        String srcFileName = node.getVar().getType().getClassDesc().getSourceFileName();
+        int separatorIdx = srcFileName.lastIndexOf(File.separator);
+        if (separatorIdx > 0) {
+          srcFileName = srcFileName.substring(separatorIdx + 1);
+        }
+        node.stallSite.getNumLine();
+        attributes +=
+            "STALL SITE" + "\\n" + srcFileName + ":" + node.getStallSiteFlatNode().getNumLine()
+                + "\\n" + "\"]";
       } else {
         attributes += "LIVE-IN" + "\\n" + "\"]";
       }