将 gprof 与 pthread 结合使用

发布于 2024-07-22 11:51:57 字数 64 浏览 3 评论 0原文

gprof 可以用来分析使用 pthread 的多线程程序吗? 也就是说,它的输出是否包括所有线程所使用的时间?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

零度℉ 2024-07-29 11:51:58

是的,借助此处描述的解决方法是可能的。

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

眼中杀气 2024-07-29 11:51:58

您是否考虑过pstack? 它在多线程下工作得很好,并且有利于通过 stackshot 方法发现性能问题。
gprof 就是这样,但你很可能可以做得更好。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文