
Hi all. Sorry if this is the wrong venue for this. First a question about the old reference counting implementation in Pypy. I wanted to learn and work on the garbage collection of Pypy. First, in this paper from <https://bitbucket.org/pypy/extradoc/raw/tip/eu-report/D07.1_Massive_Parallel...> 2007 about PyPy <https://bitbucket.org/pypy/extradoc/raw/tip/eu-report/D07.1_Massive_Parallel...>, it mentions a reference counting GC transformer, which is not mentioned anymore in the 2.4.x documentation ( https://pypy.readthedocs.org/en/release-2.4.x/garbage_collection.html). The latest documentation doesn't seem to have a version of this garbage_collection page. I wanted to do some studies on reference counting and the implementation does not have to be efficient or fast. What is the best way to get at the old refcount implementation? Would it be to work on the last version to have it? Secondly, I wanted to log a trace of all allocations of objects and all updates to references. Is there infrastructure or tool that exists for this? Thanks. - Raoul

Hi Raoul, On 27 April 2016 at 22:42, Raoul Veroy <rveroy@cs.tufts.edu> wrote:
First a question about the old reference counting implementation in Pypy.
It is still there, used mainly by tests of the C backend. But it wasn't used for translating the full PyPy for many years now, so you are very likely to get into various problems.
I wanted to do some studies on reference counting and the implementation does not have to be efficient or fast.
Well, a good reference counting implementation would be able to remove a large fraction of the incref/decref operations, by clever code analysis. I don't really understand what kind of study might be interesting on a bad reference counting implementation like ours.
Secondly, I wanted to log a trace of all allocations of objects and all updates to references. Is there infrastructure or tool that exists for this?
No. I tried in the distant past to do that to track a hard bug, with some success, but it involved too many hacks to be merged back into "default". If you want to dig, it was the branch "lltrace", last check-in 2011-02-24. Nowadays there would be additional complications; for example, the JIT often allocates several objects using a single pointer bump. A bientôt, Armin.

Hi Raoul, On 27 April 2016 at 22:42, Raoul Veroy <rveroy@cs.tufts.edu> wrote:
First a question about the old reference counting implementation in Pypy.
It is still there, used mainly by tests of the C backend. But it wasn't used for translating the full PyPy for many years now, so you are very likely to get into various problems.
I wanted to do some studies on reference counting and the implementation does not have to be efficient or fast.
Well, a good reference counting implementation would be able to remove a large fraction of the incref/decref operations, by clever code analysis. I don't really understand what kind of study might be interesting on a bad reference counting implementation like ours.
Secondly, I wanted to log a trace of all allocations of objects and all updates to references. Is there infrastructure or tool that exists for this?
No. I tried in the distant past to do that to track a hard bug, with some success, but it involved too many hacks to be merged back into "default". If you want to dig, it was the branch "lltrace", last check-in 2011-02-24. Nowadays there would be additional complications; for example, the JIT often allocates several objects using a single pointer bump. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Raoul Veroy