papi_avail shows event's, can't access in C


I'm trying to run PAPI on an Odroid-XU4, I've installed PAPI and when I run papi_avail -a I can see 16 events available.

I've set perf_event_paranoidto -1.

When I try to call PAPI using C, it always says:

Event doesn't exist

even though I know the hardware has 16 events.

When I run PAPI's tests I see this error:

Couldn't open hw_instructions in exclude_guest = 0

Does anyone know what this error means and how I can fix it to get PAPI working?


I've included the output of papi_component_avail and papi_avail -a in case that helps.


odroid@odroid:~/Desktop$ papi_component_avail
Available components and hardware information.
PAPI version             :
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.

Output when trying to install 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:

  You may also want to install one of the following packages to keep up to date:
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'
asked on Stack Overflow Jan 5, 2020 by Francis • edited Jan 5, 2020 by Francis

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0