]> git.baikalelectronics.ru Git - kernel.git/commit
perf_events: Fix read() bogus counts when in error state
authorStephane Eranian <eranian@google.com>
Thu, 26 Nov 2009 17:24:30 +0000 (09:24 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 26 Nov 2009 17:49:59 +0000 (18:49 +0100)
commitc064e20167370f95455031ea870e52e107e7a023
treebdfefc2d8376bde15f1defab28201c341c9d6e0c
parenta3708016d7774db733d67db0e0611c123df37483
perf_events: Fix read() bogus counts when in error state

When a pinned group cannot be scheduled it goes into error state.

Normally a group cannot go out of error state without being
explicitly re-enabled or disabled. There was a bug in per-thread
mode, whereby upon termination of the thread, the group would
transition from error to off leading to bogus counts and timing
information returned by read().

Fix it by clearing the error state.

Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: perfmon2-devel@lists.sourceforge.net
LKML-Reference: <4b0eb9ce.0508d00a.573b.ffffeab6@mx.google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c