From: Will Deacon Date: Fri, 25 Mar 2011 16:12:37 +0000 (+0100) Subject: ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency X-Git-Tag: v2.6.39-rc2~40^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a737823d37666255e3e74ce84bc9611a038e0888;p=pandora-kernel.git ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency 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. Acked-by: Jamie Iles Reported-by: Ashwin Chaugule Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed