linux/arch/powerpc
Anton Blanchard 4bca770ede powerpc: perf: Fix frequency calculation for overflowing counters
When profiling a benchmark that is almost 100% userspace, I noticed some wildly
inaccurate profiles that showed almost all time spent in the kernel.

Closer examination shows we were programming a tiny number of cycles into the
PMU after each overflow (about ~200 away from the next overflow). This gets us
stuck in a loop which we eventually break out of by throttling the PMU (there
are regular throttle/unthrottle events in the log).

It looks like we aren't setting event->hw.last_period to something same and the
frequency to period calculations in perf are going haywire.

With the following patch we find the correct period after a few interrupts and
stay there. I also see no more throttle events.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
LKML-Reference: <20110117161742.5feb3761@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-01-17 11:43:02 +01:00
..
boot powerpc: Fix div64 in bootloader 2010-11-18 14:39:24 +11:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-10-25 08:32:05 -07:00
include/asm Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
kernel powerpc: perf: Fix frequency calculation for overflowing counters 2011-01-17 11:43:02 +01:00
kvm KVM: PPC: BookE: Load the lower half of MSR 2010-11-05 14:42:29 -02:00
lib powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
math-emu powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
mm powerpc: Use call_rcu_sched() for pagetables 2010-11-30 10:42:20 +11:00
oprofile oprofile/fsl emb: Don't set MSR[PMM] until after clearing the interrupt. 2010-10-14 00:53:05 -05:00
platforms powerpc/mpc5200: include fs.h in mpc52xx_gpt.c 2010-12-23 12:08:02 -07:00
sysdev Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
xmon powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
Kconfig powerpc: Set CONFIG_32BIT on ppc32 2010-11-18 14:54:23 +11:00
Kconfig.debug powerpc: Unconditionally enabled irq stacks 2010-06-15 15:02:37 +10:00
Makefile powerpc: Fix typo in uImage target 2010-08-24 15:26:32 +10:00
relocs_check.pl