]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Fix running time accounting
authorPeter Zijlstra <peterz@infradead.org>
Mon, 27 Jul 2015 08:35:07 +0000 (10:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 27 Jul 2015 11:52:19 +0000 (13:52 +0200)
commitafde9f9363c5959947a9456d223af3934b806417
treeec5cf352c1cb61b944a9e6c2e969489441370f09
parented5bcb8aebc0174d7396d6222e17a9773f9bdb9a
perf: Fix running time accounting

A recent fix to the shadow timestamp inadvertly broke the running time
accounting.

We must not update the running timestamp if we fail to schedule the
event, the event will not have ran. This can (and did) result in
negative total runtime because the stopped timestamp was before the
running timestamp (we 'started' but never stopped the event -- because
it never really started we didn't have to stop it either).

Reported-and-Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 5310692cd4ee ("perf: Update shadow timestamp before add event")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org # 4.1
Cc: Shaohua Li <shli@fb.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/events/core.c