benfred / py-spy

Sampling profiler for Python programs
MIT License
12.13k stars 401 forks source link

`--native` #646

Open w14 opened 6 months ago

w14 commented 6 months ago

The docs state:

py-spy supports profiling native python extensions written in languages like C/C++ or Cython, on x86_64 Linux and Windows. You can enable this mode by passing --native on the command line.

How should it be called? Try a simple program:

py-spy record --native -o profile.svg -- python3 test.py

And I got the error "unrecognized flag".

benfred commented 6 months ago

Hmm, this should work (at least on x86_64 Linux and windows)

What operating system are you using? Also what kind of cpu is this on?

peekxc commented 3 months ago

Can confirm this doesn't work on OS X (x86_64)