Using gprof with pthreads

2019-02-05 13:34发布

Can gprof be used to profile a multi-threaded program that uses pthreads? That is, will its output include the time used in all the threads?

2条回答
smile是对你的礼貌
2楼-- · 2019-02-05 13:52

Have you considered pstack? It works fine with multiple threads, and it is good for finding performance problems by the stackshot method. gprof is what it is, but chances are you can do better.

查看更多
闹够了就滚
3楼-- · 2019-02-05 14:11

Yes, it is possible with the help of a workaround described here.

查看更多
登录 后发表回答