[pypy-svn] pypy jit-lsprofile: promote the profiler. this gives good improvements but is a problem when the
cfbolz
commits-noreply at bitbucket.org
Tue Jan 4 01:13:09 CET 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: jit-lsprofile
Changeset: r40365:706679373a64
Date: 2011-01-04 01:05 +0100
http://bitbucket.org/pypy/pypy/changeset/706679373a64/
Log: promote the profiler. this gives good improvements but is a problem
when the user does something strange, like create lots of profiler
instances.
diff --git a/pypy/module/_lsprof/interp_lsprof.py b/pypy/module/_lsprof/interp_lsprof.py
--- a/pypy/module/_lsprof/interp_lsprof.py
+++ b/pypy/module/_lsprof/interp_lsprof.py
@@ -258,6 +258,7 @@
def _enter_call(self, f_code):
# we have a superb gc, no point in freelist :)
+ self = jit.hint(self, promote=True)
entry = self._get_or_make_entry(f_code)
self.current_context = ProfilerContext(self, entry)
@@ -265,12 +266,14 @@
context = self.current_context
if context is None:
return
+ self = jit.hint(self, promote=True)
entry = self._get_or_make_entry(f_code, False)
if entry is not None:
context._stop(self, entry)
self.current_context = context.previous
def _enter_builtin_call(self, key):
+ self = jit.hint(self, promote=True)
entry = self._get_or_make_builtin_entry(key)
self.current_context = ProfilerContext(self, entry)
@@ -278,6 +281,7 @@
context = self.current_context
if context is None:
return
+ self = jit.hint(self, promote=True)
entry = self._get_or_make_builtin_entry(key, False)
if entry is not None:
context._stop(self, entry)
More information about the Pypy-commit
mailing list