We fixed the bug of where to find the stallsite reachgraph. \n\n We found an even...
authorstephey <stephey>
Sat, 22 Jan 2011 00:58:26 +0000 (00:58 +0000)
committerstephey <stephey>
Sat, 22 Jan 2011 00:58:26 +0000 (00:58 +0000)
Robust/src/Analysis/Disjoint/DisjointAnalysis.java
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/IR/Flat/RuntimeConflictResolver.java

index b7866137039f317e1bafbb8bb6a2baa5adf0e2f8..d3be8ed0119a8c1408a5efbd0a0b8fe97e01b383 100644 (file)
@@ -1109,7 +1109,9 @@ public class DisjointAnalysis {
     FlatSESEExitNode  fsexn;
 
     //Stores the flatnode's reach graph at enter
-    fn2rgAtEnter.put(fn, rg);
+    ReachGraph rgOnEnter = new ReachGraph();
+    rgOnEnter.merge( rg );
+    fn2rgAtEnter.put(fn, rgOnEnter);
     
     // use node type to decide what transfer function
     // to apply to the reachability graph
index b54714b6cad585f4a0382dd2bda16f30f73e0b75..46d7464a65efc1a1f871c6bb674a7c26f0a358a0 100644 (file)
@@ -1050,6 +1050,17 @@ public class OoOJavaAnalysis {
         rhs = fen.getSrc();
       }
 
+      // jjenista - I think the following code is WRONG!!!
+      // We are looking at some non-task FlatNode fn that is a stall site and
+      // considering what conflicts it might have with CHILDREN of the CURRENT TASK
+      // that contains fn.  WE SHOULD NOT BE GETTING THE PARENT OF currentSESE
+      // because in this scenario currentSESE IS the parent in relation to other
+      // tasks that might conflict with this fn.
+      // OK, why not fix it?  Because code all over the place is built on
+      // being able to retrieve the correct conflict graph, which is associated
+      // with the wrong task, but at least consistently, SO LEAVE IT BUT REALIZE
+      // WHAT IS HAPPENING
+
       Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
       for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
         FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
@@ -1087,6 +1098,17 @@ public class OoOJavaAnalysis {
         rhs = fsen.getSrc();
       }
 
+      // jjenista - I think the following code is WRONG!!!
+      // We are looking at some non-task FlatNode fn that is a stall site and
+      // considering what conflicts it might have with CHILDREN of the CURRENT TASK
+      // that contains fn.  WE SHOULD NOT BE GETTING THE PARENT OF currentSESE
+      // because in this scenario currentSESE IS the parent in relation to other
+      // tasks that might conflict with this fn.
+      // OK, why not fix it?  Because code all over the place is built on
+      // being able to retrieve the correct conflict graph, which is associated
+      // with the wrong task, but at least consistently, SO LEAVE IT BUT REALIZE
+      // WHAT IS HAPPENING
+
       // collects effects of stall site and generates stall site node
       Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
       for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
@@ -1120,6 +1142,17 @@ public class OoOJavaAnalysis {
       // collects effects of stall site and generates stall site node
       Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
 
+      // jjenista - I think the following code is WRONG!!!
+      // We are looking at some non-task FlatNode fn that is a stall site and
+      // considering what conflicts it might have with CHILDREN of the CURRENT TASK
+      // that contains fn.  WE SHOULD NOT BE GETTING THE PARENT OF currentSESE
+      // because in this scenario currentSESE IS the parent in relation to other
+      // tasks that might conflict with this fn.
+      // OK, why not fix it?  Because code all over the place is built on
+      // being able to retrieve the correct conflict graph, which is associated
+      // with the wrong task, but at least consistently, SO LEAVE IT BUT REALIZE
+      // WHAT IS HAPPENING
+
       Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
       for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
         FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
index 8311bff2a62d66175ab7cb262302ac27f806fe27..6f13a586f5f6ad88db028570990b341ffc185e97 100644 (file)
@@ -175,12 +175,20 @@ public class RuntimeConflictResolver {
       CodePlan cp = oooa.getCodePlan(fn);
       fsen = cp.getCurrentSESE();
       
+      // jjenista - I think the following code is WRONG!!! (but right... :(  )
+      // see note in OoOJavaAnalysis.java explaining that conflict graphs are
+      // correct but stored in a parent's parent by mistake, and then in places
+      // like this we look to the parent's parent for the correct conflict graph.
+      // It should be oooa.getConflictGraph(fsen) which is the task enclosing the
+      // stall site, and who's children might conflict with the stall site.
+      // DON'T CHANGE IT unless you are willing to find the many, many dependent
+      // code sections based on this behavior, but understand what is happening.
+      
       if(  fsen.getSESEParent().size() != 0                                                     &&
           (parentSESE     = (FlatSESEEnterNode)fsen.getSESEParent().iterator().next())  != null &&
           (conflictGraph  = oooa.getConflictGraph(parentSESE))                          != null &&
           (conflicts      = conflictGraph.getConflictEffectSet(fn))                     != null &&
-          //TODO this still uses the old method of getting reachGraphs. 
-          (rg             = disjointAnaylsis.getReachGraph(fsen.getmdEnclosing()))      != null ){
+          (rg             = disjointAnaylsis.getEnterReachGraph(fn))                    != null ){
 
         Set<SESELock> seseLockSet = oooa.getLockMappings(conflictGraph);
         Set<WaitingElement> waitingElementSet =
@@ -858,7 +866,7 @@ public class RuntimeConflictResolver {
     
     for (Taint t : taints) {
       flatnode = (isStallSite) ? t.getStallSite():t.getSESE();
-
+      
       if( flatnode != null        && 
           flatnode.equals(fn)     && 
           t.getVar().equals(var.getTempDescriptor())) {