<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic i.MX6 - No hardware perf events supported by kernel in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716130#M111271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using i.MX6QDL(ARM Cortex A9) based Nitrogen6x board running Android 7.1.1. Kernel source can be found at - &lt;A href="https://github.com/boundarydevices/linux-imx6/tree/boundary-imx-n7.1.1_1.0.0-ga"&gt;https://github.com/boundarydevices/linux-imx6/tree/boundary-imx-n7.1.1_1.0.0-ga&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I am facing is with hardware performance events support. Below is the kernel configuration.&lt;/P&gt;&lt;P&gt;dtsi changes --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pmu {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "arm,cortex-a9-pmu";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;interrupts = &amp;lt;0 94 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Kernel macro --&lt;BR /&gt;CONFIG_HW_PERF_EVENTS=y&lt;BR /&gt;CONFIG_DEBUG_KERNEL=n&lt;BR /&gt;CONFIG_TRACE=y&lt;BR /&gt;CONFIG_TRACING=y&lt;BR /&gt;CONFIG_DEBUG_FS=y&lt;BR /&gt;CONFIG_TRACING_SUPPORT=y&lt;BR /&gt;CONFIG_FTRACE=y&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;But with 'simpleperf list' it's displaying no 'events' for hw-cache and hardware.&lt;/P&gt;&lt;P&gt;# simpleperf list &lt;BR /&gt;List of hw-cache events:&lt;/P&gt;&lt;P&gt;List of hardware events:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the queries.&lt;BR /&gt;1. Does i.MX6QDL supports PMU? If yes, did I missed anything in configuration to enable it?&lt;BR /&gt;2. How to support hardware events and specifically "cpu-cycle" hardware event from the kernel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;saiyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Feb 2018 07:27:42 GMT</pubDate>
    <dc:creator>saiyamdoshi</dc:creator>
    <dc:date>2018-02-05T07:27:42Z</dc:date>
    <item>
      <title>i.MX6 - No hardware perf events supported by kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716130#M111271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using i.MX6QDL(ARM Cortex A9) based Nitrogen6x board running Android 7.1.1. Kernel source can be found at - &lt;A href="https://github.com/boundarydevices/linux-imx6/tree/boundary-imx-n7.1.1_1.0.0-ga"&gt;https://github.com/boundarydevices/linux-imx6/tree/boundary-imx-n7.1.1_1.0.0-ga&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I am facing is with hardware performance events support. Below is the kernel configuration.&lt;/P&gt;&lt;P&gt;dtsi changes --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pmu {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "arm,cortex-a9-pmu";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;interrupts = &amp;lt;0 94 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Kernel macro --&lt;BR /&gt;CONFIG_HW_PERF_EVENTS=y&lt;BR /&gt;CONFIG_DEBUG_KERNEL=n&lt;BR /&gt;CONFIG_TRACE=y&lt;BR /&gt;CONFIG_TRACING=y&lt;BR /&gt;CONFIG_DEBUG_FS=y&lt;BR /&gt;CONFIG_TRACING_SUPPORT=y&lt;BR /&gt;CONFIG_FTRACE=y&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;But with 'simpleperf list' it's displaying no 'events' for hw-cache and hardware.&lt;/P&gt;&lt;P&gt;# simpleperf list &lt;BR /&gt;List of hw-cache events:&lt;/P&gt;&lt;P&gt;List of hardware events:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the queries.&lt;BR /&gt;1. Does i.MX6QDL supports PMU? If yes, did I missed anything in configuration to enable it?&lt;BR /&gt;2. How to support hardware events and specifically "cpu-cycle" hardware event from the kernel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;saiyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 07:27:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716130#M111271</guid>
      <dc:creator>saiyamdoshi</dc:creator>
      <dc:date>2018-02-05T07:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 - No hardware perf events supported by kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716131#M111272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saiyam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, as stated in the ERR006259 “ARM: Debug/trace functions (PMU.." &lt;BR /&gt;erratum, the i.MX6QDL does not support the PMU.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf" title="https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf"&gt;https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also may be useful&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://patchwork.openembedded.org/patch/85345/" title="https://patchwork.openembedded.org/patch/85345/"&gt;[meta-fsl-arm-extra] linux-wandboard: Configure the ARM core to use hardware performance counters. - Patchwork&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/252330.html" title="http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/252330.html"&gt;[PATCH] ARM: imx6q: work around faulty PMU irq routing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 10:11:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716131#M111272</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-02-05T10:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 - No hardware perf events supported by kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716132#M111273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/igorpadykov"&gt;igorpadykov&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for pointing to useful information and patch. I have tried simpleperf"&amp;nbsp;list after applying both the patches and still no events listed for hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-weight: normal;"&gt;#simpleperf list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-weight: normal;"&gt;List of hw-cache events:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-weight: normal;"&gt;List of hardware events:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-weight: normal;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Basically, we&amp;nbsp;need to enabled&amp;nbsp;hw perf events because we are getting a below failure while executing CTS_R13 on our device running Nougat 7.1.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="width: 801px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="" colspan="3" style="width: 780px;"&gt;&lt;A name="armeabi-v7a&amp;nbsp;CtsSimpleperfTestCases"&gt;&lt;/A&gt;armeabi-v7a&amp;nbsp;CtsSimpleperfTestCases&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH style="width: 233px;"&gt;Test&lt;/TH&gt;&lt;TH style="width: 43px;"&gt;Result&lt;/TH&gt;&lt;TH style="width: 504px;"&gt;Details&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="" style="width: 233px;"&gt;record_cmd#event_modifier&lt;/TD&gt;&lt;TD class="" style="width: 43px;"&gt;&lt;DIV style="margin-left: auto; margin-right: auto;"&gt;fail&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="" style="width: 504px;"&gt;&lt;DIV class=""&gt;CtsSimpleperfTestCases E 11402 11402 event_selection_set.cpp:64] Event type 'cpu-cycles:u' is not supported by the kernel&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="" style="width: 233px;"&gt;stat_cmd#event_modifier&lt;/TD&gt;&lt;TD class="" style="width: 43px;"&gt;&lt;DIV style="margin-left: auto; margin-right: auto;"&gt;fail&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="" style="width: 504px;"&gt;&lt;DIV class=""&gt;CtsSimpleperfTestCases E 11402 11402 event_selection_set.cpp:64] Event type 'cpu-cycles:u' is not supported by the kernel&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;saiyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 05:51:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-No-hardware-perf-events-supported-by-kernel/m-p/716132#M111273</guid>
      <dc:creator>saiyamdoshi</dc:creator>
      <dc:date>2018-02-06T05:51:18Z</dc:date>
    </item>
  </channel>
</rss>

