【问题标题】:oprofile can not use hardware performance countersoprofile 不能使用硬件性能计数器
【发布时间】:2010-12-06 05:11:01
【问题描述】:

我在带有 2 个 Xeon E5504 处理器的 IBM HS22 刀片上安装了 debian 5.0 linux 服务器。我发现 oprofile 在此设置中无法识别硬件性能计数器,只有定时器中断可用:

# opcontrol -l
Using timer interrupt.
# cat /dev/oprofile/cpu_type 
timer

系统信息为:

# cat /etc/issue.net 
Debian GNU/Linux 5.0
# uname -a
Linux xxx 2.6.26-2-686-bigmem #1 SMP Mon Jun 21 06:45:17 UTC 2010 i686 GNU/Linux

oprofile 是使用 apt 从 debian 存储库安装的。

# opcontrol --version
opcontrol: oprofile 0.9.3 compiled on Feb 10 2008 12:08:26

我应该怎么做才能启用硬件性能计数器?谢谢!

【问题讨论】:

  • 嗨@Long 你能解决这个问题吗??

标签: linux debian oprofile


【解决方案1】:

请检查内核源代码,在 linux/arch/your_machine_architecture/kernel/cputable.c 文件中,.num_pmcs 是否为您的机器架构定义。例如。对于 PPC970MP 架构,您可以在 linux/arch/powerpc/kernel/cputable.c --> Line No.272(内核版本 2.6.32)中找到它。因为一些较旧的内核版本没有为所有架构定义这个 .num_pmcs。

我建议使用此解决方案,因为我在尝试在 2.6.14 内核上运行 PPC970MP 架构的 oprofile 时遇到了类似问题。

希望这个答案能帮助您解决问题。请回复。

【讨论】:

  • 嗨,Prasad,我在 ARM 平台上,你有什么想法可以解决这个问题吗?
猜你喜欢
  • 2011-10-29
  • 2015-03-24
  • 2012-02-04
  • 1970-01-01
  • 2011-05-07
  • 2015-05-25
  • 2020-05-19
  • 2014-02-06
  • 2010-10-28
相关资源
最近更新 更多