Linux应用程序分析 [英] Linux application profiling

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

问题描述

我需要一些方法来记录Linux机器上应用程序的性能.我没有IDE.

I need some means of recording the performance of an application on a Linux machine. I won't have an IDE.

理想情况下,我需要一个将附加到进程并记录以下内容的定期快照的应用程序: 内存使用情况 线程数 CPU使用率

Ideally, I need an app that will attach to a process and log periodic snapshots of: memory usage number of threads CPU usage

有什么想法吗?

推荐答案

如果您正在寻找可以提高程序速度的方法,则需要

If you are looking for things to do to possibly speed up the program, you need stackshots. A simple way to do this is to use the pstack utility, or lsstack if you can get it.

您可以比 gprof 做得更好.您想使用正式的性能分析工具,想要在挂钟时间对调用堆栈进行采样并提供线路级成本的工具,例如Oprofile或RotateRight/Zoom.

You can do better than gprof. If you want to use an official profiling tool, you want something that samples the call stack on wall-clock time and presents line-level cost, such as Oprofile or RotateRight/Zoom.

这篇关于Linux应用程序分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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