在Linux上进行性能分析 [英] Performance profiling on Linux

查看:135
本文介绍了在Linux上进行性能分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是分析C中的最佳工具/ C ++在* nix应用程序?

(我希望能配置文件服务器是(阻塞)文件IO,网络和叉()/ execv()的一些繁重epoll的混合,但一般帮助,更全面的工具都还AP preciated。)

你能给RAM,CPU,网络和磁盘的大系统画面于一身的概述,并钻了进去?

有已经有很多在内核名单谈话了解之类的<$c$c>perf时间图 ,但我没有发现任何东西在Ubuntu转向了呢。


解决方案

我建议采取stackshots,为此,的pstack 是非常有用的。这里有一些更多的信息:


  1. 上的 gprof的 <评论/ p>


  2. <一个href=\"http://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-$c$c-in-linux/378024#378024\">How stackshots的工作。


  3. <一个href=\"http://stackoverflow.com/questions/926266/performance-optimization-strategies-of-last-resort/927773#927773\">A窜吹的例子。


  4. <一个href=\"http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/1562802#1562802\">A解释很简短。


如果你想花的钱,变焦看起来像pretty好工具。

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()/execv() for some heavy lifting; but general help and more general tools are all also appreciated.)

Can you get the big system picture of RAM, CPU, network and disk all in one overview, and drill into it?

There's been a lot of talk on the kernel lists about things like perf timechart, but I haven't found anything turning up in Ubuntu yet.

解决方案

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.

这篇关于在Linux上进行性能分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆