boundarydevices / linux

Kernel tree for Boundary Devices platforms
194 stars 290 forks source link

boundary-imx-n7.1.1_1.0.0-ga - No hardware perf events supported by kernel #41

Closed saiyamd closed 6 years ago

saiyamd commented 6 years ago

I am using i.MX6Q (ARM Cortex A9) based Nitrogen6x board running Android 7.1.1. Kernel (boundary-imx-n7.1.1_1.0.0-ga)

The issue I am facing is with hardware performance events support. Below is the kernel configuration.

dtsi changes -- pmu { compatible = "arm,cortex-a9-pmu"; interrupts = <0 94 IRQ_TYPE_LEVEL_HIGH>; } Kernel macro enabled -- CONFIG_HW_PERF_EVENTS=y CONFIG_DEBUG_KERNEL=n CONFIG_TRACE=y CONFIG_TRACING=y CONFIG_DEBUG_FS=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y

and with these changes "armv7_a9_pmu_init" probe call succeeds and I am getting "hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available" kernel log message. But with 'simpleperf list' it's displaying no 'events' for hw-cache and hardware.

simpleperf list List of hw-cache events: List of hardware events:

My question is, how to enable support of hardware events and specifically "cpu-cycle" in kernel?

Basically, I need to enabled hw perf events because we are getting a below failure while executing CTS_R13 on our device running Nougat 7.1.1.

armeabi-v7a CtsSimpleperfTestCases

record_cmd#event_modifier | fail | CtsSimpleperfTestCases E 11402 11402 event_selection_set.cpp:64] Event type 'cpu-cycles:u' is not supported by the kernel

stat_cmd#event_modifier | fail | CtsSimpleperfTestCases E 11402 11402 event_selection_set.cpp:64] Event type 'cpu-cycles:u' is not supported by the kernel

Thanks, saiyam

gibsson commented 6 years ago

Hi,

As NXP told you on the community, the PMU doesn't work on i.MX6 when a JTAG clock isn't provided: ERR006259 ARM: Debug/trace functions (PMU, PTM and ETB) are disabled with absence of JTAG_TCK clock after POR

Therefore this feature will not be supported in our kernel.

Regards