perf, x86: Don't reset the LBR as frequently
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 8 Mar 2010 12:51:12 +0000 (13:51 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Mar 2010 12:23:38 +0000 (13:23 +0100)
commitb83a46e7da4a948cc852ba7805dfb1a392dec861
treec835dc67658e7daf2b98536d7984563a7c3972a1
parentad0e6cfe2a2a61d7b5530188e571d508146cb43b
perf, x86: Don't reset the LBR as frequently

If we reset the LBR on each first counter, simple counter rotation which
first deschedules all counters and then reschedules the new ones will
lead to LBR reset, even though we're still in the same task context.

Reduce this by not flushing on the first counter but only flushing on
different task contexts.

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>
arch/x86/kernel/cpu/perf_event_intel_lbr.c