[pypy-commit] pypy value-profiling: (arigo, cfbolz): print not when jitting

cfbolz noreply at buildbot.pypy.org
Tue Aug 11 19:16:57 CEST 2015


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: value-profiling
Changeset: r78927:47d8cc161fcd
Date: 2015-08-11 19:17 +0200
http://bitbucket.org/pypy/pypy/changeset/47d8cc161fcd/

Log:	(arigo, cfbolz): print not when jitting

diff --git a/pypy/interpreter/valueprof.py b/pypy/interpreter/valueprof.py
--- a/pypy/interpreter/valueprof.py
+++ b/pypy/interpreter/valueprof.py
@@ -45,9 +45,10 @@
                     print "NO LONGER CONSTANT", self._vprof_msg, 'int', value
                 self._vprof_status = SEEN_TOO_MUCH
             else:
-                self._vprof_counter += 1
-                if self._vprof_counter == 200:
-                    print self._vprof_msg, 'int', value
+                if not jit.we_are_jitted():
+                    self._vprof_counter += 1
+                    if self._vprof_counter == 200:
+                        print self._vprof_msg, 'int', value
         elif status == SEEN_OBJ:
             self._vprof_status = SEEN_TOO_MUCH
             if self._vprof_counter >= 200:
@@ -75,9 +76,10 @@
                     print "NO LONGER CONSTANT", self._vprof_msg, 'obj', value
                 self._vprof_status = SEEN_TOO_MUCH
             else:
-                self._vprof_counter += 1
-                if self._vprof_counter == 200:
-                    print self._vprof_msg, 'obj', value
+                if not jit.we_are_jitted():
+                    self._vprof_counter += 1
+                    if self._vprof_counter == 200:
+                        print self._vprof_msg, 'obj', value
 
     def can_fold_read_int(self):
         return self._vprof_status == SEEN_INT


More information about the pypy-commit mailing list