[PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
David Laight
David.Laight at ACULAB.COM
Wed Apr 27 22:42:30 EST 2011
> + if (prev > val && (prev - val) < 256)
> + delta = 0;
> +
> + return delta;
Also, 'prev' is a true 64bit value, but 'val' is only ever 32bits.
So once the 64bit 'prev' exceeds 2^32+256 both 'prev > val'
and 'prev - val' are true regardless of the value of 'val'.
This will lead to jumps in the value ....
David
More information about the Linuxppc-dev
mailing list