[pypy-commit] pypy vmprof: Broken logic: every 1000 code objects, one was ignored
arigo
noreply at buildbot.pypy.org
Thu Apr 2 15:16:19 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
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):
More information about the pypy-commit
mailing list