Author: Armin Rigo <[email protected]>
Branch: jit-counter
Changeset: r67763:1c80e5ce5fdc
Date: 2013-10-31 11:53 +0100
http://bitbucket.org/pypy/pypy/changeset/1c80e5ce5fdc/

Log:    Fix for tests: some tests use trace_eagerness=1

diff --git a/rpython/jit/metainterp/counter.py 
b/rpython/jit/metainterp/counter.py
--- a/rpython/jit/metainterp/counter.py
+++ b/rpython/jit/metainterp/counter.py
@@ -28,9 +28,7 @@
         """Return the 'increment' value corresponding to the given number."""
         if threshold <= 0:
             return 0.0   # no increment, never reach 1.0
-        if threshold < 2:
-            threshold = 2
-        return 1.0 / (threshold - 0.001)   # the number is at most 0.500xx
+        return 1.0 / (threshold - 0.001)
 
     def get_index(self, hash):
         """Return the index (< self.size) from a hash value.  This keeps
@@ -45,6 +43,8 @@
 
     def tick(self, index, increment):
         counter = float(self.timetable[index]) + increment
+        #print '-'*79
+        #print 'COUNTER TICK:', index, '-> %s' % counter
         if counter < 1.0:
             self.timetable[index] = r_singlefloat(counter)
             return False
@@ -53,6 +53,8 @@
     tick._always_inline_ = True
 
     def reset(self, index):
+        #print '-'*79
+        #print 'COUNTER RESET:', index
         self.timetable[index] = r_singlefloat(0.0)
 
     def lookup_chain(self, index):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to