Replies: 4 comments 3 replies
-
Do you mean the internal PyPy source code or the code of your program being run with PyPY? For the former, there is no good answer. For the latter, see vmprof-python and the jit log documentation |
Beta Was this translation helpful? Give feedback.
-
I mean the internal PyPy source code.For example, gcov can be used to collect the coverage of cpython. |
Beta Was this translation helpful? Give feedback.
-
Using gcov only gives you part of the story. There is a lot of pure-python code (in lib-python and lib_pypy) that is used when running the interpreter, this code is interpreted and sometimes JITted during execution. How would you get coverage statistics on that? How does your analysis of CPython handle the stdlib code? You could theoretically use gcov with PyPy as well, but then you would need a reverse map of the RPython-to-C-code. Perhaps resolving #4837 would help in that direction, help is needed. What would you do with that data once you have it? |
Beta Was this translation helpful? Give feedback.
-
Maybe it would help us a little bit to understand what exactly this is for? From the bugs you report it sounds like you're working on fuzzing the jit, maybe? Do you want to try to use some kind of coverage guided fuzzing? I'm sure it would be possible to use gcov with pypy by hacking the automatically generated Makefile (in /tmp/usession-*/testing_1/Makefile). However, that gives you coverage of the interpreter and the meta-jit only, not really any information about which part of the interpreter the meta-jit is compiling. Getting coverage information about what part of the interpreter the jit is compiling could be interesting! That would require a bit of work on the rpython internals though. If you want to go in this direction, I'm happy to provide pointers. |
Beta Was this translation helpful? Give feedback.
-
I am interested in collecting coverage data for the rpython/jit source code while executing programs with PyPy. Specifically, I would like to know which parts of the code in rpython/jit are being used during program execution. Could you please advise on what tools or methods are recommended for this purpose?
Beta Was this translation helpful? Give feedback.
All reactions