使用py-spy查看python程序调用堆栈

  1. 安装py-spy
pip install py-spy
  1. top查看python pid
top
  1. 查看代码堆栈
py-spy top --pid 1780 
posted @ 2021-06-16 14:40  致林  阅读(417)  评论(0编辑  收藏  举报