py-spy
py-spy copied to clipboard
py-spy cost too much cpu when enable --gil
when i use py-spy, i find it cost too much cpu. the process only cost cpu less than 1%, but py-spy cost cpu more than 20%.
py-spy record --nonblocking --format raw --threads --pid 18024
python version:
[root@plat-sh-data-testing-common-pic-infer-demo001 test]# /proc/18024/exe -V
Python 3.7.7
@benfred
here is flamegraph of perf record -g py-spy:
when i use --gil, the issue disapppear.