1>确定以下内核选项已选定:
CONFIG_OPROFILE
CONFIG_X86_LOCAL_APIC
CONFIG_X86_IO_APIC
CONFIG_PCI_IOAPIC
2> oprofile 命令
opcontrol --init #加载模块
opcontrol --vmlinux=/path/vmlinux #是否对kernel进行profiling
opcontrol --reset #清除当前会话中的数据
opcontrol --start #开始profiling
./progam #运行应用程序,oprofile会对它进行profiling
opcontrol --dump #把收集到的数据写入文件
opcontrol --stop #停止profiling
opcontrol --shutdown #关闭守护进程oprofiled
opcontrol --deinit #卸载模块
opcontrol -l # 列出当前可用监控事件.
opreport -l # 列出当前内核性能统计信息.
opannotate -s ./program # 列出引用程序性能统计信息
3. 问题处理
1> # ./opcontrol --init
grep: /etc/mtab: No such file or directory
grep: /etc/mtab: No such file or directory
Kernel support not available, missing opcontrol --init as root ? 错误怎么解决?
# mount -o remount rw /
# mount -o rw,remount -t yaffs2 /dev/mtdblock3 /system
# touch /etc/mtab
# echo nodev /dev/oprofile oprofilefs rw 0 0>/etc/mtab
2> #./opcontrol --init
Kernel support not available, missing opcontrol --init as root ? 错误怎么解决?
检查/etc/mtab文件内容,确保是nodev /dev/oprofile oprofilefs rw 0 0
3> # opcontrol --init
opcontrol --init
cat: can't open '/dev/oprofile/cpu_type': No such file or directory
Unable to open cpu_type file for reading
Make sure you have done opcontrol --init
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode 错误怎么解决?
执行
# mount -t oprofilefs nodev /dev/oprofile
4> # opcontrol --start
mkdir: can't create directory '/var/': Read-only file system
Couldn't mkdir -p /var/lib/oprofile 错误怎么解决?
执行
# mount -o remount rw /
分享到:
相关推荐
Oprofile 0.9.4 程序性能分析必备工具
oprofile 相关代码和使用说明 调试Linux程序必备
对oproflie的使用做了非常详细的说明,很清楚,是学习oprofie工具的必备文档,oprofile是linux/adroid下必备的性能分析工具
oprofile 移植到板端 oprofile 移植
Oprofile 用户手册,Oprofile user manual.pdf
Oprofile在Android中的应用.pdf
oProfile是用于Linux的若干种评测和性能监控工具中的一种,它可以工作在不同的体系结构上,包括MIPS、ARM、IA32、IA64和AMD。oProfile包含在Linux2.5和更高版本的内核中,也包含在大多数较新的Linux版本中,包括...
一款很强大的内核分析工具,技术开发者的福音,此文档详细得介绍了这款强大工具的使用方法。
Oprofile-0.9.7.tar.gz linux平台性能测试必备工具。
oprofile-0.9.5.tar.zip ,很经典的Linux系统资源分析工具。
在虚拟机和ubuntu(18.04)上安装运行oprofile0.9.9,具体方法参考https://blog.csdn.net/lizhengx/article/details/80748867
oprofile 是linux下很长有用的性能分析工具,这个文档是oprofile官方网站提供的manual的pdf版
离线安装包,亲测可用
官方离线安装包,测试可用。请使用rpm -ivh [rpm完整包名] 进行安装
linux 强大的性能测试工具的用法 powerful tool and to profile a set of applications to understand the output from OProfile. This is an excellent tool to have in your toolbox.
oprofile gprof 资源收集 资源收集
oprofile性能分析工具,使用说明见本人博客
离线安装包,亲测可用
Edwin.Rong达人总结的文章,对oprofile的移植很有帮助,在这共享出来,方便你我!:)
离线安装包,亲测可用