]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
perf events, x86: Work around the Nehalem AAJ80 erratum
authorIngo Molnar <mingo@elte.hu>
Wed, 27 Apr 2011 09:51:41 +0000 (11:51 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 26 Apr 2011 17:34:34 +0000 (19:34 +0200)
commitec75a71634dabe439db91c1ef51d5099f4493808
treebf62d417bd365f62d4a8afca02a93d37a106a339
parent18a073a3acd3a47fbb5e23333df7fad28d576345
perf events, x86: Work around the Nehalem AAJ80 erratum

On Nehalem CPUs the retired branch-misses event can be completely bogus,
when there are no branch-misses occuring. When there are a lot of branch
misses then the count is pretty accurate. Still, this leaves us with an
event that over-counts a lot.

Detect this erratum and work it around by using BR_MISP_EXEC.ANY events.
These will also count speculated branches but still it's a lot more
precise in practice than the architectural event.

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-yyfg0bxo9jsqxd6a0ovfny27@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_event_intel.c