[PATCH 5/5] arm/perfevents: implement perf event support for ARMv6
Jamie Iles
jamie at jamieiles.com
Mon Jan 4 06:46:10 EST 2010
On Mon, Jan 04, 2010 at 11:17:33AM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 04, 2010 at 10:48:42AM +0000, Jamie Iles wrote:
> > This patch implements support for ARMv6 performance counters in the
> > Linux performance events subsystem. ARMv6 architectures that have the
> > performance counters should enable HW_PERF_EVENTS and define the
> > interrupts for the counters in arch/arm/kernel/perf_event.c
>
> Only comment is the number of BUG()s in this code - I count 6 of them.
> BUG() is not meant to be used as an "assert" for when expectations are
> not met - does it really make sense to crash the kernel when any of
> these are hit? Are you at risk of losing data if one of your conditions
> isn't satisfied?
>
> You may want to consider using WARN_ON() instead - at least that doesn't
> take out the kernel.
Ok, good point. I've replaced these with WARN_ONCE()'s so we don't get too
much noise with repeated accesses.
Jamie
More information about the linux-arm-kernel
mailing list