i.MX6 - No hardware perf events supported by kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 - No hardware perf events supported by kernel

2,592 Views
saiyamdoshi
Contributor II

I am using i.MX6QDL(ARM Cortex A9) based Nitrogen6x board running Android 7.1.1. Kernel source can be found at - https://github.com/boundarydevices/linux-imx6/tree/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 --
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:

Below are the queries.
1. Does i.MX6QDL supports PMU? If yes, did I missed anything in configuration to enable it?
2. How to support hardware events and specifically "cpu-cycle" hardware event from the kernel?

Thanks,

saiyam

0 Kudos
2 Replies

1,356 Views
saiyamdoshi
Contributor II

Hi igorpadykov‌,

Thanks for pointing to useful information and patch. I have tried simpleperf" list after applying both the patches and still no events listed for hardware.

#simpleperf list

List of hw-cache events:

List of hardware events:

Basically, we 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
TestResultDetails
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

Please advise.

Thanks,

saiyam

0 Kudos

1,356 Views
igorpadykov
NXP Employee
NXP Employee

Hi Saiyam

unfortunately, as stated in the ERR006259 “ARM: Debug/trace functions (PMU.."
erratum, the i.MX6QDL does not support the PMU.

https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf 

also may be useful

[meta-fsl-arm-extra] linux-wandboard: Configure the ARM core to use hardware performance counters. -... 

[PATCH] ARM: imx6q: work around faulty PMU irq routing 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos