From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: perf: ensure overflows aren't missed due to IRQ latency
Date: Fri, 25 Mar 2011 16:08:08 +0000 [thread overview]
Message-ID: <20110325160808.GR3130@pulham.picochip.com> (raw)
In-Reply-To: <1300986442-20461-1-git-send-email-will.deacon@arm.com>
Hi Will,
On Thu, Mar 24, 2011 at 05:07:22PM +0000, Will Deacon wrote:
> If a counter overflows during a perf stat profiling run it may overtake
> the last known value of the counter:
>
> 0 prev new 0xffffffff
> |----------|-------|----------------------|
>
> In this case, the number of events that have occurred is
> (0xffffffff - prev) + new. Unfortunately, the event update code will
> not realise an overflow has occurred and will instead report the event
> delta as (new - prev) which may be considerably smaller than the real
> count.
>
> This patch adds an extra argument to armpmu_event_update which indicates
> whether or not an overflow has occurred. If an overflow has occurred
> then we use the maximum period of the counter to calculate the elapsed
> events.
>
> Cc: Jamie Iles <jamie@jamieiles.com>
> Reported-by: Ashwin Chaugule <ashwinc@codeaurora.org>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Looks nice!
Acked-by: Jamie Iles <jamie@jamieiles.com>
Jamie
next prev parent reply other threads:[~2011-03-25 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 17:07 [PATCH v2] ARM: perf: ensure overflows aren't missed due to IRQ latency Will Deacon
2011-03-25 16:08 ` Jamie Iles [this message]
2011-03-26 6:20 ` Chris Moore
2011-03-29 9:40 ` Will Deacon
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=20110325160808.GR3130@pulham.picochip.com \
--to=jamie@jamieiles.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).