[pypy-svn] r56291 - pypy/dist/pypy/module/_lsprof
arigo at codespeak.net
arigo at codespeak.net
Fri Jul 4 10:47:53 CEST 2008
Author: arigo
Date: Fri Jul 4 10:47:52 2008
New Revision: 56291
Modified:
pypy/dist/pypy/module/_lsprof/interp_lsprof.py
Log:
This __del__ was a bad idea: it's pointless because the executioncontext
holds a ref to space.wrap(self) as long as the profiler is enabled;
moreover it's dangerous because it might accidentally un-install
another profiler that would happen to be running at that time.
Modified: pypy/dist/pypy/module/_lsprof/interp_lsprof.py
==============================================================================
--- pypy/dist/pypy/module/_lsprof/interp_lsprof.py (original)
+++ pypy/dist/pypy/module/_lsprof/interp_lsprof.py Fri Jul 4 10:47:52 2008
@@ -223,11 +223,6 @@
space.getexecutioncontext().setllprofile(None, None)
disable.unwrap_spec = ['self', ObjSpace]
- def delete(self, space):
- self._flush_unmatched()
- space.getexecutioncontext().setllprofile(None, None)
- delete.unwrap_spec = ['self', ObjSpace]
-
def getstats(self, space):
if self.w_callable is None:
factor = 1. # we measure time.time in floats
@@ -251,5 +246,4 @@
enable = interp2app(W_Profiler.enable),
disable = interp2app(W_Profiler.disable),
getstats = interp2app(W_Profiler.getstats),
- __del__ = interp2app(W_Profiler.delete),
)
More information about the Pypy-commit
mailing list