Show Table of Contents
A.15. OProfile
由 oprofile 软件包提供的 OProfile 是低开销的、系统范围的性能监控工具。它使用处理器上的性能监控硬件检索有关系统内核和执行表的信息。例如引用的内存、二级缓存请求的编号以及接收的硬件中断的编号。OProfile 也能配置运行在 Java 虚拟机(JVM)里的应用程序。
OProfile 提供以下工具。注意旧有的
opcontrol 工具和新的 operf 工具是互斥的。
- ophelp
- 显示系统的处理器可用的事件,及其简要描述。
- opimport
- 将样本数据库文件从异质的二进制格式转换为系统的本机格式。仅从不同的结构中分析样本数据库时使用该选项。
- opannotate
- 如果应用和调试符号一起被编译,为执行表创建源码。
- opcontrol
- 配置在分析运行中收集的数据。
- operf
- 打算替换
opcontrol。operf工具使用 Linux 性能事件子系统,它使您能够更准确地将配置文件作为单进程或系统范围设定目标,以及使得 OProfile 能与其他在您系统中使用性能监控的硬件工具更好的共存。不同于opcontrol,无需初始设置,并且它能在没有 root 权限的情况下使用,除非使用了--system-wide选项。 - opreport
- 检索配置文件数据。
- oprofiled
- 以后台方式运行样本数据,将其周期性地写入硬盘。
旧有模式(
opcontrol、oprofiled 和后期处理工具)仍然可用,但它不再是推荐的分析模式。
上述命令的更多信息,参见 OProfile 手册页:
$ man oprofile

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.