Thread (3 messages) 3 messages, 3 authors, 2012-02-19

Re: [PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events

From: Stephane Eranian <hidden>
Date: 2012-02-19 11:13:21
Also in: lkml

Glad to see you fixed the PPC problem.

On Thu, Feb 16, 2012 at 5:57 AM, Paul Mackerras [off-list ref] wrote:
On Thu, Feb 16, 2012 at 03:48:22PM +1100, Anton Blanchard wrote:
quoted
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
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SAMPLE events: =C2=A0 =C2=A0 =C2=A0 9=
948
quoted
Signed-off-by: Anton Blanchard <redacted>
Acked-by: Paul Mackerras <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help