linux oprofile解析
来源:互联网 发布:信用卡怎么绑定淘宝 编辑:程序博客网 时间:2024/06/03 16:41
linux oprofile解析
oprofile利用cpu硬件层面提供的性能计数器(performance counter),通过计数采样,帮助我们从进程、函数、代码层面找出占用cpu的"罪魁祸首"。下面我们通过实例,了解oprofile的具体使用方法。
常用命令
使用oprofile进行cpu使用情况检测,需要经过初始化、启动检测、导出检测数据、查看检测结果等步骤,以下为常用的oprofile命令。
初始化
- opcontrol --no-vmlinux : 指示oprofile启动检测后,不记录内核模块、内核代码相关统计数据
- opcontrol --init : 加载oprofile模块、oprofile驱动程序
检测控制
- opcontrol --start : 指示oprofile启动检测
- opcontrol --dump : 指示将oprofile检测到的数据写入文件
- opcontrol --reset : 清空之前检测的数据记录
- opcontrol -h : 关闭oprofile进程
查看检测结果
- opreport : 以镜像(image)的角度显示检测结果,进程、动态库、内核模块属于镜像范畴
- opreport -l : 以函数的角度显示检测结果
- opreport -l test : 以函数的角度,针对test进程显示检测结果
- opannotate -s test : 以代码的角度,针对test进程显示检测结果
- opannotate -s /lib64/libc-2.4.so : 以代码的角度,针对libc-2.4.so库显示检测结果
0 0
- linux oprofile解析
- Linux oprofile
- Linux oprofile 使用
- oprofile
- oprofile
- Oprofile
- oprofile
- oprofile
- OProfile
- oProfile
- oprofile
- oprofile
- OProfile
- Android traceview and linux oprofile
- source性能分析工具Oprofile详细解析
- source性能分析工具Oprofile详细解析
- 【Linux】linux性能分析工具oprofile移植
- linux内核添加对oprofile 的支持
- Guidelines for the Design of Small Sewage Treatment Plants
- Java概述与开发环境
- Android端投影演示方案
- 多人过河问题
- JavaScript之 ------ 浏览器对象模型 (BOM)
- linux oprofile解析
- JAVA 运算符
- AC自动机+状压dp hdu2825 Wireless Password
- 软件架构师应该知道的97件事之概括46-60
- Ubuntu系统清理
- java基础的总结(1)
- 如何从List集合中删除对象
- 编程思想之多线程与多进程(1)——以操作系统的角度述说线程与进程
- linux系统常用命令和解析