perf: Provide better condition for event rotation
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 8 Mar 2010 12:51:20 +0000 (13:51 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Mar 2010 12:22:36 +0000 (13:22 +0100)
commitd4944a06666054707d23e11888e480af239e5abf
tree58d8e847f198c29a2a2ddee60fe862f8973794d1
parentf3d46b2e6fa57547f9884330798792afc83f4b04
perf: Provide better condition for event rotation

Try to avoid useless rotation and PMU disables.

[ Could be improved by keeping a nr_runnable count to better account
  for the < PERF_STAT_INACTIVE counters ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c