[pypy-dev] seeking pypy gc configuring guideline

Raihan Rasheed Apurbo apurbo97 at gmail.com
Thu May 27 11:43:54 EDT 2021


Hello Armin,
I have read the test codes of test_llinterp.py and llinterp.py. I am
writing a summary below. I just want you to point out my mistakes if I am
wrong. Please help me to understand this.

Basically, llinterp is an object that can interpret given a python function
and function's arguments. It is used to test any component of pypy. If we
plug any component (that we want to test) into llinterp such as if we plug
it with a heap that has semispace gc the interpreter will use semispace gc
when it needs to use gc functionality. So if I get desired output with
semispace gc when I plug it into llinterp and do my test then I can assume
that if I build pypy properly using semispace gc that newly build pypy
would behave the same given the same test input.

Please do me a favor by commenting on this summary. This will help to know
whether my understanding is right on this matter.

Moreover, can you tell me why some of the member functions written in class
LLFrame (inside lliterp.py) only raise
NotImplmentedError exception. Methods such as op_gc_heap_stats,
op_gc_obtain_free_space, and many more just only raise this exception
without doing anything.

Thanks a lot!
-Raihan

On Sun, May 23, 2021 at 9:00 PM Raihan Rasheed Apurbo <apurbo97 at gmail.com>
wrote:

> Hello Armin,
> Thanks for pointing that out. I will definitely take a look at the test
> code of that module first.
> -Raihan
>
> On Sun, May 23, 2021 at 1:27 PM Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
> wrote:
>
>> Hi Raihan,
>>
>> Could you please describe a bit what you are trying to implement? That
>> way we could give you a bit more targeted advice.
>>
>> Cheers,
>>
>> Carl Friedrich
>>
>> On May 23, 2021 8:22:48 AM GMT+02:00, Armin Rigo <armin.rigo at gmail.com>
>> wrote:
>>>
>>> Hi Raihan,
>>>
>>> On Sat, 22 May 2021 at 14:40, Raihan Rasheed Apurbo <apurbo97 at gmail.com> wrote:
>>>
>>>>  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?
>>>>
>>>
>>> Modules from rpython.rtyper.lltypesystem are essential.  You need to
>>> learn about them to the extent that they are used.  They have test
>>> files in "test" subdirectories, like almost every file in PyPy and
>>> RPython.
>>>
>>> Armin
>>> ------------------------------
>>> pypy-dev mailing list
>>> pypy-dev at python.org
>>> https://mail.python.org/mailman/listinfo/pypy-dev
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pypy-dev/attachments/20210527/8e0c0b2f/attachment-0001.html>


More information about the pypy-dev mailing list