lkml.org 
[lkml]   [2011]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
Date
From

> 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




\
 
 \ /
  Last update: 2011-04-27 15:17    [W:0.218 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site