]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: perf: update event period in response to PERF_EVENT_IOC_PERIOD
authorWill Deacon <will.deacon@arm.com>
Wed, 15 Aug 2012 14:39:32 +0000 (15:39 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 15 Oct 2012 10:07:56 +0000 (11:07 +0100)
commit90b9027cda546e88ee6c18854e46f494b7a87d86
tree915392542390893e8d76780d686e4568992efc18
parentddffeb8c4d0331609ef2581d84de4d763607bd37
ARM: perf: update event period in response to PERF_EVENT_IOC_PERIOD

The PERF_EVENT_IOC_PERIOD ioctl command can be used to change the
sample period of a running perf_event. Consequently, when calculating
the next event period, the new period will only be considered after the
previous one has overflowed.

This patch changes the calculation of the remaining event ticks so that
they are offset if the period has changed.

Reported-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event.c