Re: [pypy-dev] PyPy JIT & C extensions
Hi Folks:
--- On Thu, 9/30/10, Armin Rigo <arigo@tunes.org> wrote:
From: Armin Rigo <arigo@tunes.org> Subject: Re: [pypy-dev] PyPy JIT & C extensions, greenlet To: "Andrew Francis" <andrewfr_ice@yahoo.com> Cc: pypy-dev@codespeak.net Date: Thursday, September 30, 2010, 5:25 AM
Maybe I should expand on an idea posted on #pypy by fijal. He mentioned that he would like to try to support Stackless in PyPy without using the stackless transform, just by using the same low-level stack hacks that are done by greenlet.c and optionally by Stackless Python. This means that there would be two different approaches we can consider to support Stackless in PyPy:
A few days ago, I floated this idea in the #pypy IRC channel. Why can't we take a JITed pypy, install the greenlet package, run it and see what happens? After all, greenlet is a C extension module. Hopefully this would provide a base line for work to be required? I am trying this but I am having a few hiccups getting setup.py to do the right thing. Since I am a newbie, I would like to know what is wrong with this line of reasoning? Cheers, Andrew
On 25 October 2010 14:12, Andrew Francis <andrewfr_ice@yahoo.com> wrote:
A few days ago, I floated this idea in the #pypy IRC channel. Why can't we take a JITed pypy, install the greenlet package, run it and see what happens? After all, greenlet is a C extension module. Hopefully this would provide a base line for work to be required? I am trying this but I am having a few hiccups getting setup.py to do the right thing. Since I am a newbie, I would like to know what is wrong with this line of reasoning?
PyPy's internal representation of frames differs from that of CPython. How does greenlet determine how much of the stack to copy? -- William Leslie
Hi, On Mon, Oct 25, 2010 at 5:12 AM, Andrew Francis <andrewfr_ice@yahoo.com> wrote:
A few days ago, I floated this idea in the #pypy IRC channel. Why can't we take a JITed pypy, install the greenlet package, run it and see what happens?
You will just get strange segfaults and no way to understand from outside where they come from. I can give some more details about them, but I guess it would not be too helpful. In summary, C extension modules have a chance to work with PyPy as long as they don't play strange tricks. A bientôt, Armin.
On Mon, Oct 25, 2010 at 2:08 PM, Armin Rigo <arigo@tunes.org> wrote:
Hi,
On Mon, Oct 25, 2010 at 5:12 AM, Andrew Francis <andrewfr_ice@yahoo.com> wrote:
A few days ago, I floated this idea in the #pypy IRC channel. Why can't we take a JITed pypy, install the greenlet package, run it and see what happens?
You will just get strange segfaults and no way to understand from outside where they come from. I can give some more details about them, but I guess it would not be too helpful. In summary, C extension modules have a chance to work with PyPy as long as they don't play strange tricks.
Hey. I had a private email exchange with Andrew and I think what he wants to achieve is a working greenlet module for PyPy. Is a current C version a good start, or something else would be a good start? Cheers, fijal
A bientôt,
Armin. _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Hi, On Mon, Oct 25, 2010 at 4:37 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
I had a private email exchange with Andrew and I think what he wants to achieve is a working greenlet module for PyPy. Is a current C version a good start, or something else would be a good start?
Sorry, I guess I should repeat here the argument I made on IRC. It would not work, because the GC will not find its roots. With --gcrootfinder=shadowstack, I think it will get confused by the switches -- maybe I am wrong and it works anyway; but then I know for sure that with --gcrootfinder=asmgcc it will definitely not work at all. (For reference, the JIT requires --gcrootfinder=asmgcc.) Armin
Hi Folks: --- On Mon, 10/25/10, Maciej Fijalkowski <fijall@gmail.com> wrote:
From: Maciej Fijalkowski <fijall@gmail.com> Subject: Re: [pypy-dev] PyPy JIT & C extensions To: "Armin Rigo" <arigo@tunes.org> Cc: "Andrew Francis" <andrewfr_ice@yahoo.com>, pypy-dev@codespeak.net Date: Monday, October 25, 2010, 7:37 AM On Mon, Oct 25, 2010 at 2:08 PM, Armin Rigo <arigo@tunes.org> wrote:
Hi,
I had a private email exchange with Andrew and I think what he wants to achieve is a working greenlet module for PyPy. Is a current C version a good start, or something else would be a good start?
Yes this is exactly what I wish to achieve. I thought starting with the current greenlet module would be a good start. Maybe we will get lucky and not need to re-invent the wheel. I would learn the terminology (i.e., shadowstacks), see how differently the stacks are laid out, get familiar with the code base and debugging techniques. Already I see interesting questions being asked. Cheers, Andrew
participants (4)
-
Andrew Francis -
Armin Rigo -
Maciej Fijalkowski -
William Leslie