红联Linux门户
Linux帮助

Linux OProfile 使用

发布时间:2006-09-18 16:18:40来源:红联作者:涵琳
确定安装了 oprifile 软件包

指定内核映像
[code] opcontrol --vmlinux=/boot/vmlinux-2.6.4-7.244-smp[/code]
启动监测
[code] opcontrol --start[/code]
运行用户程序
[code] yourapplication[/code]
停止采样
[code] opcontrol --stop[/code]
导出剖析数据
[code] opcontrol --dump

opcontrol --save=sessionname

opreport --session:sessionname[/code]

表 1. opcontrol   命令行选项

[code]opcontrol              选项 描述

--list-events             列出处理器事件和单元屏蔽(unit mask)
--vmlinux=      将要分析的内核镜像文件
--no-vmlinux             不分析内核
--reset               清除当前会话中的数据
--setup               在运行守护进程之前对其进行设置
--event=     监视给定的处理器事件
--start               开始取样
--dump               使数据流到守护进程中
--stop                停止数据取样
-h                 关闭守护进程[/code]
文章评论

共有 0 条评论