4

我正在两台几乎相同的机器上测试 oprofile 版本 1.0.0。一方面它可以完美运行,另一方面它根本不收集任何数据。Oprofile 作为源代码下载并编译并安装在每个盒子上 - 所有库/编译器等的版本相同

作为 root 我正在运行并使用推荐的 CTRL-c 退出

operf --system-wide

两个盒子上的内核都是

2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

CPU 有所不同 - 这是工作 operf box

vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
stepping        : 6
cpu MHz         : 2992.426

这是非工作框

vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.80GHz
stepping        : 10
cpu MHz         : 3790.625

即使第二个 CPU 不支持硬件分析(不确定要查找哪些标志),也有办法让它工作 - 这提到OPROFILE 无法使用计时器模式获取性能数据,但 opcontrol 在 1.0 版中消失了

工作 operf.log 文件结果

Profiling started at Mon Oct  6 14:22:33 2014
Profiling stopped at Mon Oct  6 14:23:56 2014

-- OProfile/operf Statistics --
Nr. non-backtrace samples: 1264859
Nr. kernel samples: 628924
Nr. user space samples: 635935
Nr. samples lost due to sample address not in expected range for domain: 0
Nr. lost kernel samples: 0
Nr. samples lost due to sample file open failure: 0
Nr. samples lost due to no permanent mapping: 682
Nr. user context kernel samples lost due to no app info available: 0
Nr. user samples lost due to no app info available: 0
Nr. backtraces skipped due to no file mapping: 0
Nr. hypervisor samples dropped due to address out-of-range: 0
Nr. samples lost reported by perf_events kernel: 0

非工作 operf.log 文件结果

Profiling started at Tue Oct  7 11:44:38 2014
Profiling stopped at Tue Oct  7 11:45:34 2014

-- OProfile/operf Statistics --
Nr. non-backtrace samples: 0
Nr. kernel samples: 0
Nr. user space samples: 0
Nr. samples lost due to sample address not in expected range for domain: 0
Nr. lost kernel samples: 0
Nr. samples lost due to sample file open failure: 0
Nr. samples lost due to no permanent mapping: 0
Nr. user context kernel samples lost due to no app info available: 0
Nr. user samples lost due to no app info available: 0
Nr. backtraces skipped due to no file mapping: 0
Nr. hypervisor samples dropped due to address out-of-range: 0
Nr. samples lost reported by perf_events kernel: 0
4

0 回答 0