* [PATCH] ARM: fix perf build with uclibc toolchains @ 2011-08-09 11:24 Florian Fainelli 2011-08-09 20:08 ` Will Deacon 0 siblings, 1 reply; 6+ messages in thread From: Florian Fainelli @ 2011-08-09 11:24 UTC (permalink / raw) To: linux-arm-kernel libio.h is not provided by uClibc, in order to be able to test the definition of __UCLIBC__ we need to include stdlib.h, which also includes stddef.h, providing the definition of 'NULL'. Signed-off-by: Florian Fainelli <florian@openwrt.org> --- diff --git a/tools/perf/arch/arm/util/dwarf-regs.c b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450..e8d5c55 100644 --- a/tools/perf/arch/arm/util/dwarf-regs.c +++ b/tools/perf/arch/arm/util/dwarf-regs.c @@ -8,7 +8,10 @@ * published by the Free Software Foundation. */ +#include <stdlib.h> +#ifndef __UCLIBC__ #include <libio.h> +#endif #include <dwarf-regs.h> struct pt_regs_dwarfnum { -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: fix perf build with uclibc toolchains 2011-08-09 11:24 [PATCH] ARM: fix perf build with uclibc toolchains Florian Fainelli @ 2011-08-09 20:08 ` Will Deacon 2011-08-10 10:21 ` Will Deacon 0 siblings, 1 reply; 6+ messages in thread From: Will Deacon @ 2011-08-09 20:08 UTC (permalink / raw) To: linux-arm-kernel Hi Florian, On Tue, Aug 09, 2011 at 12:24:17PM +0100, Florian Fainelli wrote: > libio.h is not provided by uClibc, in order to be able to test the > definition of __UCLIBC__ we need to include stdlib.h, which also > includes stddef.h, providing the definition of 'NULL'. > > Signed-off-by: Florian Fainelli <florian@openwrt.org> > --- > diff --git a/tools/perf/arch/arm/util/dwarf-regs.c b/tools/perf/arch/arm/util/dwarf-regs.c > index fff6450..e8d5c55 100644 > --- a/tools/perf/arch/arm/util/dwarf-regs.c > +++ b/tools/perf/arch/arm/util/dwarf-regs.c > @@ -8,7 +8,10 @@ > * published by the Free Software Foundation. > */ > > +#include <stdlib.h> > +#ifndef __UCLIBC__ > #include <libio.h> > +#endif > #include <dwarf-regs.h> > > struct pt_regs_dwarfnum { Nice to see somebody trying to get this going with uclinux! I'll give this a quick compile-check on my boards and then I'll include it in my perf-fixes branch for 3.1. Cheers, Will ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: fix perf build with uclibc toolchains 2011-08-09 20:08 ` Will Deacon @ 2011-08-10 10:21 ` Will Deacon 2011-08-10 10:56 ` Florian Fainelli 0 siblings, 1 reply; 6+ messages in thread From: Will Deacon @ 2011-08-10 10:21 UTC (permalink / raw) To: linux-arm-kernel On Tue, Aug 09, 2011 at 09:08:53PM +0100, Will Deacon wrote: > On Tue, Aug 09, 2011 at 12:24:17PM +0100, Florian Fainelli wrote: > > libio.h is not provided by uClibc, in order to be able to test the > > definition of __UCLIBC__ we need to include stdlib.h, which also > > includes stddef.h, providing the definition of 'NULL'. > > > > Signed-off-by: Florian Fainelli <florian@openwrt.org> > > --- > > diff --git a/tools/perf/arch/arm/util/dwarf-regs.c b/tools/perf/arch/arm/util/dwarf-regs.c > > index fff6450..e8d5c55 100644 > > --- a/tools/perf/arch/arm/util/dwarf-regs.c > > +++ b/tools/perf/arch/arm/util/dwarf-regs.c > > @@ -8,7 +8,10 @@ > > * published by the Free Software Foundation. > > */ > > > > +#include <stdlib.h> > > +#ifndef __UCLIBC__ > > #include <libio.h> > > +#endif > > #include <dwarf-regs.h> > > > > struct pt_regs_dwarfnum { > > Nice to see somebody trying to get this going with uclinux! I'll give this a > quick compile-check on my boards and then I'll include it in my perf-fixes > branch for 3.1. Seems happy enough on my MMU boards. Since you're using this on noMMU platforms, does that mean that you can build a static perf binary out of the box or do you need further patches for this? Will ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: fix perf build with uclibc toolchains 2011-08-10 10:21 ` Will Deacon @ 2011-08-10 10:56 ` Florian Fainelli 2011-08-10 12:26 ` Will Deacon 0 siblings, 1 reply; 6+ messages in thread From: Florian Fainelli @ 2011-08-10 10:56 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 10 August 2011 12:21:55 Will Deacon wrote: > On Tue, Aug 09, 2011 at 09:08:53PM +0100, Will Deacon wrote: > > On Tue, Aug 09, 2011 at 12:24:17PM +0100, Florian Fainelli wrote: > > > libio.h is not provided by uClibc, in order to be able to test the > > > definition of __UCLIBC__ we need to include stdlib.h, which also > > > includes stddef.h, providing the definition of 'NULL'. > > > > > > Signed-off-by: Florian Fainelli <florian@openwrt.org> > > > --- > > > diff --git a/tools/perf/arch/arm/util/dwarf-regs.c > > > b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450..e8d5c55 100644 > > > --- a/tools/perf/arch/arm/util/dwarf-regs.c > > > +++ b/tools/perf/arch/arm/util/dwarf-regs.c > > > @@ -8,7 +8,10 @@ > > > > > > * published by the Free Software Foundation. > > > */ > > > > > > +#include <stdlib.h> > > > +#ifndef __UCLIBC__ > > > > > > #include <libio.h> > > > > > > +#endif > > > > > > #include <dwarf-regs.h> > > > > > > struct pt_regs_dwarfnum { > > > > Nice to see somebody trying to get this going with uclinux! I'll give > > this a quick compile-check on my boards and then I'll include it in my > > perf-fixes branch for 3.1. > > Seems happy enough on my MMU boards. Since you're using this on noMMU > platforms, does that mean that you can build a static perf binary out of > the box or do you need further patches for this? uClibc is not only for noMMU boards, I just built an uclibc toolchain for arm targetting realview and run-tested this with qemu. This was the only patch required to cross-compile perf for me. I also tested this with eglibc. By the way, perf top reports no even being generated for realview under qemu, is that normal? -- Florian ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: fix perf build with uclibc toolchains 2011-08-10 10:56 ` Florian Fainelli @ 2011-08-10 12:26 ` Will Deacon 2011-08-10 13:08 ` Florian Fainelli 0 siblings, 1 reply; 6+ messages in thread From: Will Deacon @ 2011-08-10 12:26 UTC (permalink / raw) To: linux-arm-kernel On Wed, Aug 10, 2011 at 11:56:00AM +0100, Florian Fainelli wrote: > On Wednesday 10 August 2011 12:21:55 Will Deacon wrote: > > On Tue, Aug 09, 2011 at 09:08:53PM +0100, Will Deacon wrote: > > > On Tue, Aug 09, 2011 at 12:24:17PM +0100, Florian Fainelli wrote: > > > > libio.h is not provided by uClibc, in order to be able to test the > > > > definition of __UCLIBC__ we need to include stdlib.h, which also > > > > includes stddef.h, providing the definition of 'NULL'. > > > > > > > > Signed-off-by: Florian Fainelli <florian@openwrt.org> > > > > --- > > > > diff --git a/tools/perf/arch/arm/util/dwarf-regs.c > > > > b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450..e8d5c55 100644 > > > > --- a/tools/perf/arch/arm/util/dwarf-regs.c > > > > +++ b/tools/perf/arch/arm/util/dwarf-regs.c > > > > @@ -8,7 +8,10 @@ > > > > > > > > * published by the Free Software Foundation. > > > > */ > > > > > > > > +#include <stdlib.h> > > > > +#ifndef __UCLIBC__ > > > > > > > > #include <libio.h> > > > > > > > > +#endif > > > > > > > > #include <dwarf-regs.h> > > > > > > > > struct pt_regs_dwarfnum { > > > > > > Nice to see somebody trying to get this going with uclinux! I'll give > > > this a quick compile-check on my boards and then I'll include it in my > > > perf-fixes branch for 3.1. > > > > Seems happy enough on my MMU boards. Since you're using this on noMMU > > platforms, does that mean that you can build a static perf binary out of > > the box or do you need further patches for this? > > uClibc is not only for noMMU boards, I just built an uclibc toolchain for arm > targetting realview and run-tested this with qemu. This was the only patch > required to cross-compile perf for me. I also tested this with eglibc. Ok, great. Cross-compiling perf usually just causes endless pain for me. > By the way, perf top reports no even being generated for realview under qemu, > is that normal? My guess is that qemu isn't emulating the cycle counter, which is required to generate interrupts for use by perf. You could try disabling HW_PERF_EVENTS which will force perf to fall back to a CPU tick instead. Will ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: fix perf build with uclibc toolchains 2011-08-10 12:26 ` Will Deacon @ 2011-08-10 13:08 ` Florian Fainelli 0 siblings, 0 replies; 6+ messages in thread From: Florian Fainelli @ 2011-08-10 13:08 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 10 August 2011 14:26:48 Will Deacon wrote: > On Wed, Aug 10, 2011 at 11:56:00AM +0100, Florian Fainelli wrote: > > On Wednesday 10 August 2011 12:21:55 Will Deacon wrote: > > > On Tue, Aug 09, 2011 at 09:08:53PM +0100, Will Deacon wrote: > > > > On Tue, Aug 09, 2011 at 12:24:17PM +0100, Florian Fainelli wrote: > > > > > libio.h is not provided by uClibc, in order to be able to test the > > > > > definition of __UCLIBC__ we need to include stdlib.h, which also > > > > > includes stddef.h, providing the definition of 'NULL'. > > > > > > > > > > Signed-off-by: Florian Fainelli <florian@openwrt.org> > > > > > --- > > > > > diff --git a/tools/perf/arch/arm/util/dwarf-regs.c > > > > > b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450..e8d5c55 > > > > > 100644 --- a/tools/perf/arch/arm/util/dwarf-regs.c > > > > > +++ b/tools/perf/arch/arm/util/dwarf-regs.c > > > > > @@ -8,7 +8,10 @@ > > > > > > > > > > * published by the Free Software Foundation. > > > > > */ > > > > > > > > > > +#include <stdlib.h> > > > > > +#ifndef __UCLIBC__ > > > > > > > > > > #include <libio.h> > > > > > > > > > > +#endif > > > > > > > > > > #include <dwarf-regs.h> > > > > > > > > > > struct pt_regs_dwarfnum { > > > > > > > > Nice to see somebody trying to get this going with uclinux! I'll give > > > > this a quick compile-check on my boards and then I'll include it in > > > > my perf-fixes branch for 3.1. > > > > > > Seems happy enough on my MMU boards. Since you're using this on noMMU > > > platforms, does that mean that you can build a static perf binary out > > > of the box or do you need further patches for this? > > > > uClibc is not only for noMMU boards, I just built an uclibc toolchain for > > arm targetting realview and run-tested this with qemu. This was the only > > patch required to cross-compile perf for me. I also tested this with > > eglibc. > > Ok, great. Cross-compiling perf usually just causes endless pain for me. > > > By the way, perf top reports no even being generated for realview under > > qemu, is that normal? > > My guess is that qemu isn't emulating the cycle counter, which is required > to generate interrupts for use by perf. You could try disabling > HW_PERF_EVENTS which will force perf to fall back to a CPU tick instead. That did it, thanks a lot Will. -- Florian ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-08-10 13:08 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-09 11:24 [PATCH] ARM: fix perf build with uclibc toolchains Florian Fainelli 2011-08-09 20:08 ` Will Deacon 2011-08-10 10:21 ` Will Deacon 2011-08-10 10:56 ` Florian Fainelli 2011-08-10 12:26 ` Will Deacon 2011-08-10 13:08 ` Florian Fainelli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).