Performance profiling on Linux

后端 未结 10 1944
爱一瞬间的悲伤
爱一瞬间的悲伤 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:12

    I recommend taking stackshots, for which pstack is useful. Here's some more information:

    1. Comments on gprof.

    2. How stackshots work.

    3. A blow-by-blow example.

    4. A very short explanation.

    If you want to spend money, Zoom looks like a pretty good tool.

提交回复
热议问题