[pypy-dev] seeking pypy gc configuring guideline

Raihan Rasheed Apurbo apurbo97 at gmail.com
Sat May 22 08:40:09 EDT 2021


Hello Armin,
Thanks for helping me out. I was actually looking for a generalized
solution. The last paragraph of your answer covers that. What I understand
from that is, if I want to understand how pypy gc works and if i want to
write my own version of GC at first I have to understand all the tests
written on rpython/memory. I will now look extensively into that.

I have tried to understand some of the test codes earlier but there is a
problem that I faced. Suppose gc_test_base.py written in
rpython/memory/test not only uses modules written in rpython.memory but
also uses modules like llinterp from rpython.rtyper. As I don't know how
those modules work how do I figure out their function written in the test
codes? Do you have any suggestions for someone who is facing this issue?

On Sat, May 22, 2021 at 2:00 PM Armin Rigo <armin.rigo at gmail.com> wrote:

> Hi Raihan,
>
> On Sat, 22 May 2021 at 09:05, Raihan Rasheed Apurbo <apurbo97 at gmail.com>
> wrote:
>
>> I was trying to run pypy using semispace gc. But as it stands currently I
>> can only compile using incminimark and boehm. What changes I have to make
>> so that I would be able to test pypy with any existing gc implementation?
>> Moreover I want to write my own version of gc and test with pypy. In
>> future. Can anyone point me where do I have to make changes to make my
>> implementation of any arbitrary gc work? So far I was able to compile an
>> edited version of incminimark gc.
>> Any suggestions or link to any perticular documentation would be
>> appreciated.
>>
>> p.s. I ran pypy with the following command and got this error. I can run
>> same command just replacing incminimark in place of semispace.
>>
>
> This screenshot contains the whole explanation in bold red text: some
> components of PyPy have evolved over time to depend on special features of
> the GC.  These features have been implemented only in the 'incminimark' and
> the 'boehm' GC.  For experimentation with other GCs, you can disable these
> components---like the 'cpyext' module of PyPy---by following the
> instructions in the bold red text.
>
> Note also that if you want to play with the GC, it makes little sense to
> translate a complete PyPy every time.  You should at least have a small
> RPython program, much simpler than the whole PyPy, and use that for
> testing.  But ideally you should look at the way we write various tests in
> rpython/memory/.
>
>
> A bientôt,
>
> Armin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pypy-dev/attachments/20210522/a65b8b67/attachment.html>


More information about the pypy-dev mailing list