error for using oprofile.ko to profiling

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

error for using oprofile.ko to profiling

2,014 Views
jojorong
Contributor IV

Hi,

  I use the oprofile to measured the performance of my application, there something wrong to use the oprofile.ko as following in yocto "dylan":

  It's known issue or bug ?

root@imx6qsabresd:~# opcontrol --start --separate=lib --no-vmlinux -c 5

oprofile: using arm/armv7-ca9

ATTENTION: Use of opcontrol is discouraged.  Please see the man page for operf.

Detected stale lock file. Removing.

Using default event: CPU_CYCLES:100000:0:1:1

Using 2.6+ OProfile kernel interface.

Using log file /var/lib/oprofile/samples/oprofiled.log

Daemon started.

irq 126: nobody cared (try booting with the "irqpoll" option)

[<800478f0>] (unwind_backtrace+0x0/0xf8) from [<800b08e4>] (__report_bad_irq+0x24/0xc0)

[<800b08e4>] (__report_bad_irq+0x24/0xc0) from [<800b0c2c>] (note_interrupt+0x1ec/0x248)

[<800b0c2c>] (note_interrupt+0x1ec/0x248) from [<800af168>] (handle_irq_event_percpu+0xa8/0x180)

[<800af168>] (handle_irq_event_percpu+0xa8/0x180) from [<800af27c>] (handle_irq_event+0x3c/0x5c)

[<800af27c>] (handle_irq_event+0x3c/0x5c) from [<800b15f0>] (handle_fasteoi_irq+0x98/0x158)

[<800b15f0>] (handle_fasteoi_irq+0x98/0x158) from [<800aea68>] (generic_handle_irq+0x20/0x34)

[<800aea68>] (generic_handle_irq+0x20/0x34) from [<800419b0>] (handle_IRQ+0x4c/0xb0)

[<800419b0>] (handle_IRQ+0x4c/0xb0) from [<80040b4c>] (__irq_svc+0x4c/0xe8)

[<80040b4c>] (__irq_svc+0x4c/0xe8) from [<80079618>] (__do_softirq+0x50/0x150)

[<80079618>] (__do_softirq+0x50/0x150) from [<80079ba0>] (irq_exit+0x94/0x9c)

[<80079ba0>] (irq_exit+0x94/0x9c) from [<8003b1c8>] (do_local_timer+0x70/0x94)

[<8003b1c8>] (do_local_timer+0x70/0x94) from [<80040b4c>] (__irq_svc+0x4c/0xe8)

Exception stack(0xba99bd68 to 0xba99bdb0)

bd60:                   bf1b5800 bf1b6000 00000020 0000001f bf4ac000 bf1b5000

bd80: 2ad3e000 8bfe36a0 0004f4ac ba954ab0 bac5aea0 00000002 00000000 ba99bdb0

bda0: 8004dc08 8004dad0 800f0113 ffffffff

[<80040b4c>] (__irq_svc+0x4c/0xe8) from [<8004dad0>] (v7_flush_kern_dcache_area+0x28/0x3c)

[<8004dad0>] (v7_flush_kern_dcache_area+0x28/0x3c) from [<8004dc08>] (v6_copy_user_highpage_nonaliasing+0x40/0x54)

[<8004dc08>] (v6_copy_user_highpage_nonaliasing+0x40/0x54) from [<800dc8d8>] (do_wp_page+0xe4/0x72c)

[<800dc8d8>] (do_wp_page+0xe4/0x72c) from [<800de8d8>] (handle_pte_fault+0x3b0/0x7d8)

[<800de8d8>] (handle_pte_fault+0x3b0/0x7d8) from [<800dedd0>] (handle_mm_fault+0xd0/0x120)

[<800dedd0>] (handle_mm_fault+0xd0/0x120) from [<8004b3a0>] (do_page_fault+0x18c/0x2f8)

[<8004b3a0>] (do_page_fault+0x18c/0x2f8) from [<8003b370>] (do_DataAbort+0x34/0x98)

[<8003b370>] (do_DataAbort+0x34/0x98) from [<80041084>] (ret_from_exception+0x0/0x10)

Exception stack(0xba99bfb0 to 0xba99bff8)

bfa0:                                     00000328 00000000 00000000 0000029d

bfc0: 00000328 00000000 47f01400 00000078 2ad3e4c0 0016b948 0000029d 7ee649c4

bfe0: 00000000 7ee649a8 2ad3e000 47e6bf20 600f0010 ffffffff

handlers:

[<80049c24>] armv7pmu_handle_irq

Disabling IRQ #126

Profiler running.

root@imx6qsabresd:~# testprogram

root@imx6qsabresd:~# opcontrol --stop

Stopping profiling.

root@imx6qsabresd:~# opreport -l testprogram > ~/imx6.op.txt

Using /var/lib/oprofile/samples/ for samples directory.

error: no sample files found: profile specification too strict ?

Labels (3)
0 Kudos
5 Replies

791 Views
daiane_angolini
NXP Employee
NXP Employee

Last information I got on this issue is that it´s documented on ERR006259 (http://cache.freescale.com/files/32bit/doc/errata/IMX6DQCE.pdf?fpsp=1&WT_TYPE=Errata&WT_VENDOR=FREES...)

And there is one "known workaround"

Symbol: HW_PERF_EVENTS [=y]

  │ Type  : boolean 

  │ Prompt: Enable hardware performance counter support for perf events

  │   Defined at arch/arm/Kconfig:1582

  │   Depends on: PERF_EVENTS [=y] && CPU_HAS_PMU [=y]

  │   Location:

  │     -> Kernel Features

0 Kudos

791 Views
daiane_angolini
NXP Employee
NXP Employee
0 Kudos

791 Views
rebelalliance
Contributor III

I am getting the same error.  I cross compiled oprofile 0.9.8 and upon running operf, I get this crash:

irq 126: nobody cared (try booting with the "irqpoll" option)

[<80048854>] (unwind_backtrace+0x0/0xf8) from [<800acf20>] (__report_bad_irq+0x28/0xc4)

[<800acf20>] (__report_bad_irq+0x28/0xc4) from [<800ad264>] (note_interrupt+0x1e4/0x240)

[<800ad264>] (note_interrupt+0x1e4/0x240) from [<800ab7b0>] (handle_irq_event_percpu+0xa8/0x180)

[<800ab7b0>] (handle_irq_event_percpu+0xa8/0x180) from [<800ab8c4>] (handle_irq_event+0x3c/0x5c)

[<800ab8c4>] (handle_irq_event+0x3c/0x5c) from [<800adc48>] (handle_fasteoi_irq+0xbc/0x154)

[<800adc48>] (handle_fasteoi_irq+0xbc/0x154) from [<800ab0c0>] (generic_handle_irq+0x28/0x3c)

[<800ab0c0>] (generic_handle_irq+0x28/0x3c) from [<80042870>] (handle_IRQ+0x4c/0xac)

[<80042870>] (handle_IRQ+0x4c/0xac) from [<80041a0c>] (__irq_svc+0x4c/0xe8)

[<80041a0c>] (__irq_svc+0x4c/0xe8) from [<80106c94>] (sys_select+0xc4/0x10c)

[<80106c94>] (sys_select+0xc4/0x10c) from [<80041fc0>] (ret_fast_syscall+0x0/0x30)

handlers:

[<8004ab24>] armv7pmu_handle_irq

Disabling IRQ #126

My hardware is SabreSD with i.MX6Q and 4.0.0 Linux BSP.

I was really hoping to profile my app to see where I need to optimize.  Is there a fix/workaround for this? 

Please advise.

0 Kudos

791 Views
tarteauxfraises
Contributor II

This bug is described here: [PATCH 0/9] ARM perf updates for 3.7. I made a kernel patch on file "arch/arm/plat-mxc/devices/platform-imx-pmu.c".

Be carefull, this patch doesn't solve the heart of the problem: "We have only one interrupt for 4 core and fo 4 PMU.".  The measures may be imprecise!!

24a25,47

> #include <linux/smp.h>

>

> /*

>  * The PMU IRQ lines of four cores are wired together into a single interrupt.

>  * Bounce the interrupt to the other core if it's not ours.

>  */

> static irqreturn_t mx6_pmu_handler(int irq, void *dev, irq_handler_t handler)

> {

>     irqreturn_t ret = handler(irq, dev);

>     int id = smp_processor_id();

>     int next_id = (id + 1) % setup_max_cpus;

>

>     if (ret == IRQ_NONE && cpu_online(next_id))

>         irq_set_affinity(irq, cpumask_of(next_id));

>

>     /*

>      * We should be able to get away with the amount of IRQ_NONEs we give,

>      * while still having the spurious IRQ detection code kick in if the

>      * interrupt really starts hitting spuriously.

>      */

>     return ret;

> }

>

27,31c50,58

<         [0] = {

<                 .start  = MXC_INT_CHEETAH_PERFORM,

<                 .end    = MXC_INT_CHEETAH_PERFORM,

<                 .flags  = IORESOURCE_IRQ,

<         },

---

>     [0] = {

>         .start    = MXC_INT_CHEETAH_PERFORM,

>         .end    = MXC_INT_CHEETAH_PERFORM,

>         .flags    = IORESOURCE_IRQ,

>     },

> };

>

> static struct arm_pmu_platdata mx6_pmu_platdata = {

>     .handle_irq        = mx6_pmu_handler,

35,38c62,66

<         .name           = "arm-pmu",

<         .id             = ARM_PMU_DEVICE_CPU,

<         .num_resources  = ARRAY_SIZE(mx6_pmu_resources),

<         .resource       = mx6_pmu_resources,

---

>     .name        = "arm-pmu",

>     .id        = ARM_PMU_DEVICE_CPU,

>     .num_resources    = ARRAY_SIZE(mx6_pmu_resources),

>     .resource    = mx6_pmu_resources,

>     .dev.platform_data    = &mx6_pmu_platdata,

43c71

<         platform_device_register(&mx6_pmu_device);

---

>     platform_device_register(&mx6_pmu_device);

44a73

>

@

0 Kudos

791 Views
rebelalliance
Contributor III

Ok, thank you.  :smileyhappy:

0 Kudos