lkml.org 
[lkml]   [2012]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events
On Thu, Feb 16, 2012 at 03:48:22PM +1100, Anton Blanchard wrote:
>
> perf on POWER stopped working after commit e050e3f0a71b (perf: Fix
> broken interrupt rate throttling). That patch exposed a bug in
> the POWER perf_events code.
>
> Since the PMCs count upwards and take an exception when the top bit
> is set, we want to write 0x80000000 - left in power_pmu_start. We were
> instead programming in left which effectively disables the counter
> until we eventually hit 0x80000000. This could take seconds or longer.
>
> With the patch applied I get the expected number of samples:
>
> # taskset -c 0 yes > /dev/null &
> # perf record -C 0 -a sleep 10
> # perf report -D | grep SAMPLE | tail -1
> SAMPLE events: 9948
>
> Signed-off-by: Anton Blanchard <anton@samba.org>

Acked-by: Paul Mackerras <paulus@samba.org>


\
 
 \ /
  Last update: 2012-02-16 06:01    [W:0.035 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site