perf, x86: Prefer fixed-purpose counters when scheduling
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 10 Nov 2011 14:15:42 +0000 (15:15 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Dec 2011 07:33:58 +0000 (08:33 +0100)
commit4defea8559bc0f97a899d94c8d19d3b8bb802bc4
treea9f0e5352d199542128e538ce77ff0d271ac23db
parentbc1738f6ee83015f090867813dcca4d690e7917c
perf, x86: Prefer fixed-purpose counters when scheduling

This avoids a scheduling failure for cases like:

  cycles, cycles, instructions, instructions (on Core2)

Which would end up being programmed like:

  PMC0, PMC1, FP-instructions, fail

Because all events will have the same weight.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-8tnwb92asqj7xajqqoty4gel@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_event.c