[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6D8AD06@saturn3.aculab.com>
Date: Wed, 27 Apr 2011 14:13:25 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Eric B Munson" <emunson@...bm.net>
Cc: <benh@...nel.crashing.org>, <a.p.zijlstra@...llo.nl>,
<paulus@...ba.org>, <mingo@...e.hu>, <acme@...stprotocols.net>,
<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<anton@...ba.org>, <stable@...nel.org>
Subject: RE: [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
> prev and val are both 64 bit variables holding 32 bit numbers, we do
not
> accumulate in either, they are both replaced by values directly from
the
> registers.
> So prev > val will not always be true.
The code seems to be:
prev = local64_read(&event->hw.prev_count);
val = read_pmc(event->hw.idx);
delta = check_and_compute_delta(prev, val);
local64_add(delta, &event->count);
Which looks very much like 'prev' being a 64bit counter generated
from the 32bit pmc register.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists