Kernel papi#U avail显示事件';s、 can';C语言中的t访问
我试图在Odroid-XU4上运行PAPI,我已经安装了PAPI,当我运行Kernel papi#U avail显示事件';s、 can';C语言中的t访问,kernel,perf,papi,Kernel,Perf,Papi,我试图在Odroid-XU4上运行PAPI,我已经安装了PAPI,当我运行PAPI\u avail-a时,我可以看到16个可用事件 我已经将perf_event_paranoid设置为-1 当我尝试使用C调用PAPI时,它总是说: 事件不存在 尽管我知道硬件有16个事件 当我运行PAPI的测试时,我看到以下错误: Couldn't open hw_instructions in exclude_guest = 0 有人知道这个错误是什么意思吗?我怎样才能修复它使PAPI正常工作 编辑 我已经包
PAPI\u avail-a
时,我可以看到16个可用事件
我已经将perf_event_paranoid设置为-1
当我尝试使用C调用PAPI时,它总是说:
事件不存在
尽管我知道硬件有16个事件
当我运行PAPI的测试时,我看到以下错误:
Couldn't open hw_instructions in exclude_guest = 0
有人知道这个错误是什么意思吗?我怎样才能修复它使PAPI正常工作
编辑
我已经包括了papi\u component\u avail
和papi\u avail-a
的输出,以防有帮助
papi组件的可用性
odroid@odroid:~/Desktop$ papi_component_avail
Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version : 5.7.1.0
Operating system : Linux 3.10.105-141
Vendor string and code : ARM (7, 0x7)
Model string and code : ARMv7 Processor rev 3 (v7l) (3, 0x3)
CPU revision : 3.000000
CPUID : Family/Model/Stepping 7/3079/0, 0x07/0xc07/0x00
CPU Max MHz : 1400
CPU Min MHz : 200
Total cores : 8
SMT threads per core : 1
Cores per socket : 4
Sockets : 2
Cores per NUMA region : 8
NUMA regions : 0
Running in a VM : no
Number Hardware Counters : 3
Max Multiplex Counters : 384
Fast counter read (rdpmc): no
--------------------------------------------------------------------------------
Compiled-in components:
Name: perf_event Linux perf_event CPU counters
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
\-> Disabled: No uncore PMUs or events found
Active components:
Name: perf_event Linux perf_event CPU counters
Native: 122, Preset: 16, Counters: 3
PMUs supported: perf, perf_raw, arm_ac7
--------------------------------------------------------------------------------
papi\u avail-a
================================================================================
PAPI Preset Events
================================================================================
Name Code Deriv Description (Note)
PAPI_L1_DCM 0x80000000 No Level 1 data cache misses
PAPI_L1_ICM 0x80000001 No Level 1 instruction cache misses
PAPI_L2_DCM 0x80000002 No Level 2 data cache misses
PAPI_L2_TCM 0x80000007 No Level 2 cache misses
PAPI_TLB_DM 0x80000014 No Data translation lookaside buffer misses
PAPI_TLB_IM 0x80000015 No Instruction translation lookaside buffer misses
PAPI_HW_INT 0x80000029 No Hardware interrupts
PAPI_BR_MSP 0x8000002e No Conditional branch instructions mispredicted
PAPI_TOT_INS 0x80000032 No Instructions completed
PAPI_LD_INS 0x80000035 No Load instructions
PAPI_SR_INS 0x80000036 No Store instructions
PAPI_BR_INS 0x80000037 No Branch instructions
PAPI_TOT_CYC 0x8000003b No Total cycles
PAPI_L1_DCA 0x80000040 No Level 1 data cache accesses
PAPI_L2_DCA 0x80000041 No Level 2 data cache accesses
PAPI_L1_ICA 0x8000004c No Level 1 instruction cache accesses
--------------------------------------------------------------------------------
Of 16 available events, 0 are derived.
尝试安装性能时的输出
odroid@odroid:~/Desktop$ perf stat
WARNING: perf not found for kernel 3.10.105
You may need to install the following packages for this specific kernel:
linux-tools-3.10.105
You may also want to install one of the following packages to keep up to date:
linux-tools
odroid@odroid:~/Desktop$ sudo apt install linux-tools-3.10.105
[sudo] password for odroid:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-tools-3.10.105
E: Couldn't find any package by glob 'linux-tools-3.10.105'
E: Couldn't find any package by regex 'linux-tools-3.10.105'
odroid@odroid:~/Desktop$
您是否在不通过硬件事件的VM中运行此功能?像
page\u faults
这样的软件事件仍然可用。perf stat
有效吗?@PeterCordes它没有在虚拟机中运行,它没有安装perf,我已经包含了papi\u组件的输出,papi\u avail-a,以及当我尝试安装perf
时会发生什么。我在另一台装有x86_64 CPU的机器上安装了PAPI,这台机器也没有性能,但PAPI在这台机器上工作。谢谢您的帮助。@Francis,您应该以linux tools deb包的形式找到适用于arm32(任何版本)的任何debian或ubuntu内核,并将其解压缩(不安装,只需解压缩dpkg deb-x
),然后您将拥有perf tool binary。它可以使用perf list
列出一些可用的硬件事件。同时检查dmesg的输出,了解PMU事件信息<测试的code>strace可能有助于获取系统调用错误代码。