I'm trying to configure profiling of a Python application (running under pypy2.7 v7.1.1) using vmprof.
If the application is ran via pypy -m vmprof ...
, the resulting profile file contains samples from all threads (main and background). However, I need to enable and disable the profiler in a running process, so I'm doing this using the vmprof.enable()
/vmprof.disable()
functions in a signal handler. The problem is that the resulting file only contains samples from the main thread.
Is there a way to profile all threads of a running application using vmprof?