Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: value-profiling
Changeset: r78917:91a56056879f
Date: 2015-08-11 17:09 +0200
http://bitbucket.org/pypy/pypy/changeset/91a56056879f/

Log:    (arigo, cfbolz): more printing

diff --git a/pypy/interpreter/valueprof.py b/pypy/interpreter/valueprof.py
--- a/pypy/interpreter/valueprof.py
+++ b/pypy/interpreter/valueprof.py
@@ -38,6 +38,8 @@
             self._vprof_status = SEEN_INT
         elif status == SEEN_INT:
             if self.read_constant_int() != value:
+                if self._vprof_counter >= 200:
+                    print "NO LONGER CONSTANT", self._vprof_msg, 'int', value
                 self._vprof_status = SEEN_TOO_MUCH
             else:
                 self._vprof_counter += 1
@@ -45,6 +47,8 @@
                     print self._vprof_msg, 'int', value
         elif status == SEEN_OBJ:
             self._vprof_status = SEEN_TOO_MUCH
+            if self._vprof_counter >= 200:
+                print "NO LONGER CONSTANT", self._vprof_msg, 'int', value
 
     def see_object(self, value):
         status = self._vprof_status
@@ -59,9 +63,13 @@
                 # for tests, which really use unwrapped ints in a few places
                 self._vprof_status = SEEN_TOO_MUCH
         elif status == SEEN_INT:
+            if self._vprof_counter >= 200:
+                print "NO LONGER CONSTANT", self._vprof_msg, 'obj', value
             self._vprof_status = SEEN_TOO_MUCH
         elif status == SEEN_OBJ:
             if self.try_read_constant_obj() is not value:
+                if self._vprof_counter >= 200:
+                    print "NO LONGER CONSTANT", self._vprof_msg, 'obj', value
                 self._vprof_status = SEEN_TOO_MUCH
             else:
                 self._vprof_counter += 1
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to