From: Paul Mackerras <paulus@samba.org>
To: Anton Blanchard <anton@samba.org>
Cc: gleb@redhat.com, peterz@infradead.org, vince@deater.net,
eranian@google.com, linux-kernel@vger.kernel.org,
andi@firstfloor.org, emunson@mgebm.net, mingo@elte.hu,
sukadev@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
wcohen@redhat.com, asharma@fb.com, imunsie@au1.ibm.com
Subject: Re: [PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events
Date: Thu, 16 Feb 2012 15:57:49 +1100 [thread overview]
Message-ID: <20120216045749.GA25364@bloggs.ozlabs.ibm.com> (raw)
In-Reply-To: <20120216154822.5bfad11d@kryten>
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>
next prev parent reply other threads:[~2012-02-16 4:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 4:48 [PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events Anton Blanchard
2012-02-16 4:57 ` Paul Mackerras [this message]
2012-02-19 11:13 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120216045749.GA25364@bloggs.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=andi@firstfloor.org \
--cc=anton@samba.org \
--cc=asharma@fb.com \
--cc=emunson@mgebm.net \
--cc=eranian@google.com \
--cc=gleb@redhat.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.ibm.com \
--cc=vince@deater.net \
--cc=wcohen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).