mistakes in changes
authorbdemsky <bdemsky>
Tue, 25 Mar 2008 06:28:39 +0000 (06:28 +0000)
committerbdemsky <bdemsky>
Tue, 25 Mar 2008 06:28:39 +0000 (06:28 +0000)
Robust/src/Analysis/Prefetch/PrefetchAnalysis.java

index 47e297aad711a95e304f362ebb4911346ed0eb4c..34456524a05d777eaaeb9846f807907bafbb99b3 100644 (file)
@@ -161,17 +161,28 @@ public class PrefetchAnalysis {
      * returns: false
      */
     private boolean comparePrefetchSets(Hashtable<PrefetchPair, Double> oldPrefetchSet, Hashtable<PrefetchPair, Double> newPrefetchSet) {
-       if(oldPrefetchSet.size() != newPrefetchSet.size()) {
+       if (oldPrefetchSet.size()!=newPrefetchSet.size())
            return true;
-       }
+
        for(Enumeration e = newPrefetchSet.keys();e.hasMoreElements();) {
            PrefetchPair pp = (PrefetchPair) e.nextElement();
            double newprob = newPrefetchSet.get(pp).doubleValue();
            if (!oldPrefetchSet.containsKey(pp))
-               return true;//item missing
+               return true;
+           
            double oldprob = oldPrefetchSet.get(pp).doubleValue();
-           if(((newprob - oldprob) > PROB_DIFF) || (newprob >= PREFETCH_THRESHOLD_PROB && oldprob < PREFETCH_THRESHOLD_PROB))//probability different
+
+           if((newprob - oldprob) > PROB_DIFF) {
                return true;
+           }
+           if (newprob >= PREFETCH_THRESHOLD_PROB && oldprob < PREFETCH_THRESHOLD_PROB) {
+               return true;
+           }
+           if (oldprob>newprob) {
+               System.out.println("ERROR:" + pp);
+               System.out.println(oldprob + " -> "+ newprob);
+           }
+
        }
        return false;
     }
@@ -770,7 +781,7 @@ public class PrefetchAnalysis {
                }
            }
            
-           updatePrefetchSet(curr, tocompare);
+           updatePrefetchSet(curr, branch_prefetch_set);
        }
     }