grafana / grafana/pyroscope-python

Not getting profiles of custom native cpp extensions of our libraries when using pyroscope

Offen
#61 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
4
Forks
2
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
5

Beschreibung

Hi,

Thanks for your great work!

We are using pyroscope to get profiles of our custom python code. From it, with pyroscope we are only being able to profile the python functions, but we get no detail of the c/c++ extensions.

For debugging this, we tried plain py-spy. With py-spy, we needed to:
1. Compile our custom extensions with the ` -fno-omit-frame-pointer` target compile option.
2. Adding `-Ccmake.build-type=Debug` to our pip install comand.
3. Activate the _native_ flag on `py-spy` for generating the flame graph:
``` python
py-spy record --native -o ./profile.svg -- python script_to_be_profiled.py
```

With these steps, our flamegraph recovered all the native extensions detail on its profiling.

However, with pyroscope, keeping the steps 1 and 2, we were not able to activate these options.

We saw that the `native` flag has a deprecation warning, and that on the `lib.rs` file, the config interface hardcodes the native parameter to false:

https://github.com/grafana/pyroscope-python/blob/dfe738d83605f1be8f99b47722fb87c9b19618ed/rust/src/lib.rs#L107-L119

Can pyroscope be used to profile the python native extensions? If so, what could we be missing in our setup?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.