helpful progress reporting
authorjjenista <jjenista>
Wed, 17 Sep 2008 18:21:35 +0000 (18:21 +0000)
committerjjenista <jjenista>
Wed, 17 Sep 2008 18:21:35 +0000 (18:21 +0000)
Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Analysis/OwnershipAnalysis/ReachabilitySet.java

index 9647234d763dec2b5ddc398c00ba28635de9100a..7d597ae09ca46540304b5d7b4924252c948460d3 100644 (file)
@@ -397,6 +397,8 @@ public class OwnershipAnalysis {
       FlatNode fn = (FlatNode) flatNodesToVisit.iterator().next();
       flatNodesToVisit.remove(fn);
 
+      //System.out.println( "  "+fn );
+
       // perform this node's contributions to the ownership
       // graph on a new copy, then compare it to the old graph
       // at this node to see if anything was updated.
@@ -419,6 +421,12 @@ public class OwnershipAnalysis {
                            returnNodesToCombineForCompleteOwnershipGraph,
                            og);
 
+
+
+      //debugSnapshot(og,fn);
+
+
+
       // if the results of the new graph are different from
       // the current graph at this node, replace the graph
       // with the update and enqueue the children for
@@ -603,14 +611,20 @@ public class OwnershipAnalysis {
 
   // insert a call to debugSnapshot() somewhere in the analysis to get
   // successive captures of the analysis state
-  int debugCounter = 0;
-  int numIterationsIn = 80000;
-  int numIterationsToCapture = 53;
+  int debugCounter        = 0;
+  int numStartCountReport = 66000;
+  int freqCountReport     = 50;
+  int iterStartCapture    = 70000;
+  int numIterToCapture    = 100;
   void debugSnapshot( OwnershipGraph og, FlatNode fn ) {
     ++debugCounter;
-    if( debugCounter > numIterationsIn ) {
-      System.out.println( "   @@@ capturing debug "+(debugCounter-numIterationsIn)+" @@@" );
-      String graphName = String.format("snap%04d",debugCounter-numIterationsIn);
+    if( debugCounter > numStartCountReport &&
+       debugCounter % freqCountReport == 0 ) {
+      System.out.println( "    @@@ debug counter = "+debugCounter );
+    }
+    if( debugCounter > iterStartCapture ) {
+      System.out.println( "    @@@ capturing debug "+(debugCounter-iterStartCapture)+" @@@" );
+      String graphName = String.format("snap%04d",debugCounter-iterStartCapture);
       if( fn != null ) {
        graphName = graphName+fn;
       }
@@ -621,7 +635,7 @@ public class OwnershipAnalysis {
        System.exit( 0 );       
       }
     }
-    if( debugCounter == numIterationsIn + numIterationsToCapture ) {
+    if( debugCounter == iterStartCapture + numIterToCapture ) {
       System.out.println( "Stopping analysis after debug captures." );
       System.exit( 0 );
     }
index 6323975a5849b169b248a850852abfee3678cc6f..fce6f0d0be3785848fa34ccf3cc2514823c5e2f0 100644 (file)
@@ -1013,7 +1013,9 @@ public class OwnershipGraph {
        ReferenceEdge edge = edgeItr.next();
        D_i = D_i.union(edge.getBeta() );
       }
+
       D_i = D_i.exhaustiveArityCombinations();
+
       paramIndex2rewriteD.put(paramIndex, D_i);
     }
 
@@ -1106,7 +1108,6 @@ public class OwnershipGraph {
        }
       }
 
-
       // update reachable edges
       Iterator<ReferenceEdge> edgeReachableItr = edgesReachable.iterator();
       while( edgeReachableItr.hasNext() ) {
@@ -1125,7 +1126,6 @@ public class OwnershipGraph {
        edgesWithNewBeta.add(edgeReachable);
       }
 
-
       // update upstream edges
       Hashtable<ReferenceEdge, ChangeTupleSet> edgeUpstreamPlannedChanges
       = new Hashtable<ReferenceEdge, ChangeTupleSet>();
@@ -1165,7 +1165,6 @@ public class OwnershipGraph {
     }
 
 
-
     // verify the existence of allocation sites and their
     // shadows from the callee in the context of this caller graph
     // then map allocated nodes of callee onto the caller shadows
@@ -1334,7 +1333,6 @@ public class OwnershipGraph {
     }
 
 
-
     // return value may need to be assigned in caller
     if( fc.getReturnTemp() != null ) {
 
@@ -1398,7 +1396,6 @@ public class OwnershipGraph {
     }
 
 
-
     // merge the shadow nodes of allocation sites back down to normal capacity
     Iterator<AllocationSite> allocItr = ogCallee.allocationSites.iterator();
     while( allocItr.hasNext() ) {
index 64e1cc405c92031951b4a954015e838b9f3c5324..71be34fb87af768a35f59fbee19d4d2b2455997e 100644 (file)
@@ -255,6 +255,10 @@ public class ReachabilitySet extends Canonical {
 
     int numDimensions = this.possibleReachabilities.size();
 
+    if( numDimensions > 10 ) {
+      System.out.println( "exhaustiveArityCombinations numDimensions = "+numDimensions );
+    }
+
     // add an extra digit to detect termination
     int[] digits = new int[numDimensions+1];
 
@@ -284,6 +288,20 @@ public class ReachabilitySet extends Canonical {
       // increment
       for( int i = 0; i < numDimensions+1; ++i ) {
        digits[i]++;
+
+
+       if( i == 11 ) {
+         System.out.print( "x " );
+       }
+
+       if( i == 15 ) {
+         System.out.print( "@ " );
+       }
+
+       if( i == 17 ) {
+         System.out.print( "# " );
+       }
+
        if( digits[i] > maxArity ) {
          // this axis reached its max, so roll it back to min and increment next higher digit
          digits[i] = minArity;