Performance profiling on Linux

后端 未结 10 1955
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 23:40

What are the best tools for profiling C/C++ applications on *nix?

(I\'m hoping to profile a server that is a mix of (blocking) file IO, epoll for network and fork()/

10条回答
  •  佛祖请我去吃肉
    2020-12-24 00:16

    The canonical example of a full system profiling tool (for Solaris, OS X, FreeBSD) is DTrace. But it is not yet fully available on Linux (you can try here but the site is down for me at the moment, and I haven't tried it myself). There are many tools, in various states of usefulness, for doing full system profiling and kernel profiling on Linux.

    You might consider investigating:

    • oprofile
    • SystemTap
    • bootchart
    • strace (e.g. this SO answer

提交回复
热议问题