linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: perf: limit sample_period to half max_period in non-sampling mode
Date: Mon, 20 Feb 2012 13:34:00 +0000	[thread overview]
Message-ID: <20120220133400.GF25462@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CACVXFVPHrenJO_vKJNXVaSjnKHstQ3_3NRJFqhp0dTiDAAm8tw@mail.gmail.com>

On Mon, Feb 20, 2012 at 12:39:11PM +0000, Ming Lei wrote:
> On Mon, Feb 20, 2012 at 8:07 PM, Will Deacon <will.deacon@arm.com> wrote:
> > diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
> > index 5bb91bf..56173ae 100644
> > --- a/arch/arm/kernel/perf_event.c
> > +++ b/arch/arm/kernel/perf_event.c
> > @@ -180,7 +180,7 @@ armpmu_event_set_period(struct perf_event *event,
> > ?u64
> > ?armpmu_event_update(struct perf_event *event,
> > ? ? ? ? ? ? ? ? ? ?struct hw_perf_event *hwc,
> > - ? ? ? ? ? ? ? ? ? int idx, int overflow)
> > + ? ? ? ? ? ? ? ? ? int idx)
> > ?{
> > ? ? ? ?struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
> > ? ? ? ?u64 delta, prev_raw_count, new_raw_count;
> > @@ -193,13 +193,7 @@ again:
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? new_raw_count) != prev_raw_count)
> > ? ? ? ? ? ? ? ?goto again;
> >
> > - ? ? ? new_raw_count &= armpmu->max_period;
> > - ? ? ? prev_raw_count &= armpmu->max_period;
> > -
> > - ? ? ? if (overflow)
> > - ? ? ? ? ? ? ? delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;
> > - ? ? ? else
> > - ? ? ? ? ? ? ? delta = new_raw_count - prev_raw_count;
> > + ? ? ? delta = (new_raw_count - prev_raw_count) & armpmu->max_period;
> 
> Please add
> 
>            Signed-off-by: Ming Lei <ming.lei@canonical.com>

Sure, didn't want to add anything more than a CC until I was sure you were
happy with it.

On the plus side, the warnings from Stephane's IRQ throttling code have been
fixed in -rc4 by f39d47ff ("perf: Fix double start/stop in
x86_pmu_start()").

So the ball should be back in the OMAP court now as far as enabling perf on
Panda.

Will

  reply	other threads:[~2012-02-20 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 12:07 [PATCH] ARM: perf: limit sample_period to half max_period in non-sampling mode Will Deacon
2012-02-20 12:39 ` Ming Lei
2012-02-20 13:34   ` Will Deacon [this message]
2012-02-20 13:51     ` Ming Lei

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=20120220133400.GF25462@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).