filprofiler
filprofiler copied to clipboard
PyPy Support
Is PyPy support planned? Is it currently not feasible? If so, how can we help make it feasible?
I haven't really thought about PyPy. Theoretically it should be possible.
The way Fil works is that there is a fairly generic Rust library that does all the data structure work: keeping track of allocations and dumping them to SVG.
Then, there's _filpreload.c that:
- Overrides
mallocand friends and forwards it to the Rust code. This bit would apply to PyPy too, or really to other programming languages. - Efficiently figures out what the current callstack is when an allocation/free happens. This bit is highly CPython-specific, and is what allows Fil to be not too slow.
So that last bit is what would need to be rewritten in a PyPy-specific way.
That second part of _filpreload.c is currently being rewritten (#18). Once that is done, a good next step would be to split _filpreload.c into two, so there's a clear boundary between generic code and CPython-specific code.