grafana / grafana/pyroscope-python

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

Aperta
#61 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
4
Fork
2
Merge medio
2g 4h
PR unite (30g)
5

Descrizione

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?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.