Re: operf not resulting in any samples
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 04/26/2018 05:52 PM, First Strike wrote:
> thanks Will. One more detail I wanted to add was that I am running windriver linux (version 9.x) on Intel Arria 10 fpga board which doesn't have PMU support. Also, WRL doesn't support timer based counters in this version of linux. Do you think without PMU support I can get any meaningful data (for a kernel module and a user space program)?
Hi,
Looking up information about the Aria 10 fpga board (https://www.altera.com/products/soc/portfolio/arria-10-soc/overview.html). It has dual core cortex a9 processors. According to the Chapter 11 "Performance Monitoring Unit" of the "ARM^® Cortex^® ‑A9 Technical Reference Manual" available from http://infocenter.arm.com/help/index.jsp there are performance counters in this processor. However, the kernel needs to have the perf support enabled also if using a device tree to describe the machine need to have the pmu information described in there.
So for the kernel configuration needs:
CONFIG_PERF_EVENTS=y
CONFIG_HW_PERF_EVENTS=y
On some platforms the arm platform was missing information in the device tree to make the performance monitoring hardware available. This was encountered on earlier versions of Fedora on The trimslice:
https://bugzilla.redhat.com/show_bug.cgi?id=741325
I think what was the issue tegra20.dtsi was missing the following:
pmu {
compatible = "arm,cortex-a9-pmu";
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
};
Looking through the upstream linux kernel I don't see that in the any of the *arria10* device tree files. Probably sould be in socfpga_arria10.dtsi. A patch for the upstream kernel and then get Wind River to pull that into their distribution would be good.
-Will
>
> On Fri, Apr 20, 2018 at 4:09 PM, William Cohen <[email protected] <mailto:[email protected]>> wrote:
>
> On 04/20/2018 06:02 PM, First Strike wrote:
> > To add, I am building the kernel with following configs:
> > CONFIG_OPROFILE=y
> > CONFIG_HAVE_OPROFILE=y
> > CONFIG_TRACING=y
> > CONFIG_TRACING_SUPPORT=y
> >
> >
> > On Fri, Apr 20, 2018 at 2:48 PM, First Strike <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
> >
> > Folks,
> >
> > I am running Windriver linux (4.8.22-WR9) on ARM Cortex A9 CPU with
> > # operf -v
> > operf: oprofile 1.1.0
> >
> > I ran 'operf --system-wide' as well as for a specific process for approx 5mins followed by opreport. It complains with error "No Sample found".
> >
> > Can someone let me know what I could be missing out?
> >
>
> Hi,
>
> operf uses the perf interface rather than the older oprofile kernel support. If the kernel provides hardware event counting, you should see something like the following for the kernel perf tool (the cycles:u, instructions:u, branches:u, and branch-misses:u):
>
> $ perf stat true
>
> Performance counter stats for 'true':
>
> 9.324083 task-clock:u (msec) # 0.339 CPUs utilized
> 0 context-switches:u # 0.000 K/sec
> 0 cpu-migrations:u # 0.000 K/sec
> 38 page-faults:u # 0.004 M/sec
> 454,860 cycles:u # 0.049 GHz
> 174,579 instructions:u # 0.38 insn per cycle
> 16,555 branches:u # 1.776 M/sec
> 5,739 branch-misses:u # 34.67% of all branches
>
> 0.027514525 seconds time elapsed
>
> I suspect that you will need to compile the kernel with the following configure settings to provide pmu counters to operf:
>
> CONFIG_PERF_EVENTS=y
> CONFIG_HW_PERF_EVENTS=y
>
> -Will
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >
> >
> > _______________________________________________
> > oprofile-list mailing list
> > [email protected] <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/oprofile-list <https://lists.sourceforge.net/lists/listinfo/oprofile-list>
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list