intel / intel/gprofiler

python: native functions calling to python functions are not displayed

Open
#734 0 comments 0 reactions 0 assignees View on GitHub
runtime/python
Dominant language
Python
Stars
826
Forks
79
PR merge metrics
No merged PRs in 30d

Description

Native functions can be functions of the Python runtime, or Cythonized functions.

py-spy does not collect native frames at all right now (it supports collection but we don't enable this mode, partially because I'm under impression it's very inaccurate under `--nonblocking` mode).
PyPerf does collect native frames, but we stop at the first Python function (i.e the first `PyEval_EvalFrame*`).

If we have a stack like:
`python; pyfunc1; pyfunc2; cythonfunc3; cythonfunc4; pyfunc5 ...`
then both py-spy and PyPerf will collect it as `python; pyfunc1; pyfunc2; pyfunc5 ...`.

I don't have a good idea for it now, perhaps PyPerf can collect deeper native frames and correlate frames also with frames higher in the stack than the first Python frames?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.