首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在CentOS Linux下评测C程序

问在CentOS Linux下评测C程序
EN

Stack Overflow用户
提问于 2012-10-12 04:13:23
回答 1查看 1.2K关注 0票数 0

在CentOS下,哪个命令行会分析我的C程序,包括花在系统调用上的时间?yum需要安装哪些程序?

EN

回答 1

Stack Overflow用户

发布于 2012-10-12 05:07:21

安装oprofile:yum install oprofile

初始化oprofile:

代码语言:javascript
复制
opcontrol --no-vmlinux #If you have vmlinux set this option differently
opcontrol --init
opcontrol --reset
opcontrol --separate=lib
opcontrol --callgraph=0    # clear callgraph in case it was used recently
opcontrol --start

现在运行要分析的程序。运行足够长的时间后,执行以下操作:

代码语言:javascript
复制
opcontrol --dump
opreport --symbols /path/to/executable

有关其他一些示例输出,请参见here。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12847734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档