0

我正在尝试在 Odroid-XU4 上运行 PAPI,我已经安装了 PAPI,当我运行时,papi_avail -a我可以看到 16 个可用事件。

我设置perf_event_paranoid为-1。

当我尝试使用 C 调用 PAPI 时,它总是说:

活动不存在

即使我知道硬件有 16 个事件。

当我运行 PAPI 的测试时,我看到了这个错误:

Couldn't open hw_instructions in exclude_guest = 0

有谁知道这个错误是什么意思以及如何修复它以使 PAPI 正常工作?

编辑

我已经包含了的输出,papi_component_avail以防papi_avail -a万一。

papi_component_avail

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_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.

尝试安装 perf 时的输出

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$
4

0 回答 0