Using gprof with pthreads

前端 未结 2 838
情书的邮戳
情书的邮戳 2020-12-29 16:47

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条回答
  • 2020-12-29 17:29

    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.

    0 讨论(0)
  • 2020-12-29 17:35

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

    0 讨论(0)
提交回复
热议问题