Author: Armin Rigo <[email protected]>
Branch: vmprof
Changeset: r76684:2b41c53c69cb
Date: 2015-04-02 15:09 +0200
http://bitbucket.org/pypy/pypy/changeset/2b41c53c69cb/

Log:    Broken logic: every 1000 code objects, one was ignored

diff --git a/pypy/module/_vmprof/interp_vmprof.py 
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -181,9 +181,8 @@
         if self.fileno == -1:
             raise OperationError(space.w_RuntimeError,
                                  space.wrap("vmprof not running"))
-        if len(self.current_codes) < MAX_CODES:
-            self.current_codes.append(code)
-        else:
+        self.current_codes.append(code)
+        if len(self.current_codes) >= MAX_CODES:
             self._flush_codes(space)
 
     def _flush_codes(self, space):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to