I noticed that perfctr does not seem to work currently when run on a Raspberry Pi 3 Model B+ even though the Cortex A53 processor (running in ARMv7 mode) should be supported as far as I understand the documentation. Running likwid-perfctr -e results in:
ERROR - [./src/perfmon.c:perfmon_init_maps:1322] Unsupported ARMv7 Processor
ERROR - [./src/perfmon.c:perfmon_check_counter_map:746] Counter and event maps not initialized.
This architecture has 0 counters.
Counter tags(name, type<, options>):
This architecture has 0 events.
Event tags (tag, id, umask, counters<, options>):
Also, likwid-topology lists the processor model as nil:
While looking a bit around the source, I found that in topology.c and perfmon.c the switches in lines 1137 and 1287 respectively both use cpuid_info.model which in my case is 0 and not cpuid_info.part which looks to contain the correct value defined in ARM_CORTEX_A53. When building after changing this, likwid-topology now outputs the correct cpu model:
--------------------------------------------------------------------------------
CPU name: ARMv7 Processor rev 4 (v7l)
CPU type: ARM Cortex A53
CPU stepping: 4
********************************************************************************
Hardware Thread Topology
********************************************************************************
Sockets: 1
Cores per socket: 4
Threads per core: 1
--------------------------------------------------------------------------------
HWThread Thread Core Die Socket Available
0 0 0 0 0 *
1 0 1 0 0 *
2 0 2 0 0 *
3 0 3 0 0 *
--------------------------------------------------------------------------------
Socket 0: ( 0 1 2 3 )
--------------------------------------------------------------------------------
********************************************************************************
Cache Topology
********************************************************************************
********************************************************************************
NUMA Topology
********************************************************************************
NUMA domains: 1
--------------------------------------------------------------------------------
Domain: 0
Processors: ( 0 1 2 3 )
Distances: 10
Free memory: 220.812 MB
Total memory: 925.41 MB
--------------------------------------------------------------------------------
The output of likwid-perfctr -e changes to the following:
This architecture has 0 counters.
Counter tags(name, type<, options>):
This architecture has 0 events.
Event tags (tag, id, umask, counters<, options>):
Still, no counters were detected. Then I noticed that the path that is set for the PMC for the Cortex A53 in includes/perfmon_a57_counters.h, namely /sys/bus/event_source/devices/cpu, does not exist on my machine. After changing it to the only fitting sub-directory that is available on my end, /sys/bus/event_source/devices/armv7_cortex_a7, and rebuilding, perfctr now looks to be working:
Issue
I noticed that perfctr does not seem to work currently when run on a Raspberry Pi 3 Model B+ even though the Cortex A53 processor (running in ARMv7 mode) should be supported as far as I understand the documentation. Running
likwid-perfctr -e
results in:Also,
likwid-topology
lists the processor model as nil:Potential Fix
While looking a bit around the source, I found that in
topology.c
andperfmon.c
the switches in lines 1137 and 1287 respectively both usecpuid_info.model
which in my case is 0 and notcpuid_info.part
which looks to contain the correct value defined inARM_CORTEX_A53
. When building after changing this,likwid-topology
now outputs the correct cpu model:The output of
likwid-perfctr -e
changes to the following:Still, no counters were detected. Then I noticed that the path that is set for the PMC for the Cortex A53 in
includes/perfmon_a57_counters.h
, namely/sys/bus/event_source/devices/cpu
, does not exist on my machine. After changing it to the only fitting sub-directory that is available on my end,/sys/bus/event_source/devices/armv7_cortex_a7
, and rebuilding, perfctr now looks to be working: