首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OPROFILE无法获得性能数据

OPROFILE无法获得性能数据
EN

Stack Overflow用户
提问于 2012-07-12 04:10:56
回答 2查看 1.7K关注 0票数 5

我正在使用OPROFILE收集一些性能数据。但我遇到麻烦了。

这里是我的外壳:

代码语言:javascript
复制
~ # rm -f /root/.oprofile/daemonrc
~ # opcontrol --setup --no-vmlinux
~ # opcontrol --init
~ # opcontrol --reset
~ # opcontrol --start
~ # opcontrol --status

Daemon running: pid 14909    
Separate options: none
vmlinux file: none    
Image filter: none    
Call-graph depth: 0

~ # opcontrol --shutdown

Stopping profiling.
Killing daemon.

~ # opreport

error: no sample files found: profile specification too strict?

~ # tree /var/lib/oprofile/

/var/lib/oprofile/
├── abi
├── complete_dump
├── jitdump
├── opd_pipe
└── samples
    ├── current
    │   └── stats
    │       ├── bt_lost_no_mapping
    │       ├── cpu0
    │       │   ├── backtrace_aborted
    │       │   ├── sample_invalid_eip
    │       │   ├── sample_lost_overflow
    │       │   └── sample_received
    │       ├── event_lost_overflow
    │       ├── multiplex_counter
    │       ├── sample_lost_no_mapping
    │       └── sample_lost_no_mm
    └── oprofiled.log


5 directories, 13 files

~ # dmesg |grep oprofile

oprofile: using NMI interrupt.


~ # uname -a

Linux localhost.localdomain 2.6.32-220.4.2.el6.x86_64 #1 SMP Tue Feb 14 04:00:16 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux

~ # cat /proc/cpuinfo 

processor   : 0    
vendor_id   : GenuineIntel   
cpu family  : 6    
model       : 44    
model name  : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz   
stepping    : 2    
cpu MHz     : 2400.085   
cache size  : 12288 KB   
fpu     : yes    
fpu_exception   : yes    
cpuid level : 11    
wp      : yes   
flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm ida arat epb dts    
bogomips    : 4800.17    
clflush size    : 64   
cache_alignment : 64   
address sizes   : 40 bits physical, 48 bits virtual   
power management:
EN

回答 2

Stack Overflow用户

发布于 2013-09-03 10:26:48

有些CPU类型不提供使用硬件性能计数器所需的hardware support。在这些机器上,OProfile回到使用timer interrupt for profiling,回到使用实时时钟中断来收集样本。

您可以使用timer=1模块强制使用定时器中断,parameter.If OProfile是作为内核模块构建的,然后必须使用mod探测命令传递'timer=1‘参数。在执行“opcontrol --init”或编辑opcontrol命令调用mod探头以传递“timer=1”参数之前,请执行此操作

modprobe oprofile timer=1

然后继续你的分析程序

票数 1
EN

Stack Overflow用户

发布于 2013-07-11 13:53:38

我在基于RHEL6的发行版上遇到了类似的问题。在某种程度上,我开始使用perf,用它我能够获得分析器报告和注释的源代码。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11444885

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档