Hide Forgot
The fedora/RHEL-only :-( 00055-* patch for python2 (and similar for python3) adds sys/sdt.h macro calls wrapped into dtrace_enter/exit into PyEval_EvalFrameEx(). This allows a systemtap script (or gdb) to trap events when a python function is being entered or exited, and permit fairly high performance tracing or analysis. The problem is that C functions called from a python function are not reported. This makes opaque the internal operation of python programs that use a lot of C bits (time.sleep(), lock.acquire), etc. Please consider adding analogous dtrace_entry / dtrace_exit calls to the C function calling path, such as within PyCFunction_Call(), describing the PyCFunctionObject's name/location etc. as similarly as possible as the python function calls do.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
The instrumentation added to python 3.6 via upstream: % stap -L 'process("/usr/lib64/libpython3*so*").mark("*")' process("/usr/lib64/libpython3.6m.so.1.0").mark("function__entry") $arg1:long $arg2:long $arg3:long process("/usr/lib64/libpython3.6m.so.1.0").mark("function__return") $arg1:long $arg2:long $arg3:long process("/usr/lib64/libpython3.6m.so.1.0").mark("gc__done") $arg1:long process("/usr/lib64/libpython3.6m.so.1.0").mark("gc__start") $arg1:long process("/usr/lib64/libpython3.6m.so.1.0").mark("line") $arg1:long $arg2:long $arg3:long is a nice step, except that the C functions are still not visible.
This is a low priority for us. systemtap support is upstream now, however. Please open an issue there if you want to push this further.
OK, thanks. https://bugs.python.org/issue32599