[pypy-issue] [issue895] Continulets + JIT
tracker at bugs.pypy.org
Fri Oct 7 12:05:53 CEST 2011
New submission from Armin Rigo <armin.rigo at gmail.com>:
Stacklets (and continulets, greenlets, etc.) are almost, but not
completely, working with the JIT.
Stacklets are transparently compatible with the JIT, in the sense
that the JIT will trace and compile code corresponding to one
stacklet at a time. If this stacklet switches temporarily away
while the JIT is tracing, the tracing is suspended and resumes
normally when the stacklet resumes.
The exception to this rule is virtualizables and virtualrefs: the
'vable_token' field in PyFrames and in JIT_VIRTUAL_REFs contains a
stack address, but the stack might be switched away.
So if you have code that accesses (directly or indirectly) the
frames of another stacklet in a JITted loop, it crashes completely.
Note that e.g. in a non-main greenlet, if you just call
sys._getframe(n) for a large enough n, then you are reading frames
that belong to the main greenlet --- crash.
nosy: arigo, pypy-issue
title: Continulets + JIT
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue