From: tip-bot for Vince Weaver <vweaver1@eecs.utk.edu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, paulus@samba.org,
hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl,
robert.richter@amd.com, fweisbec@gmail.com, stable@kernel.org,
tglx@linutronix.de, vweaver1@eecs.utk.edu, mingo@elte.hu,
borislav.petkov@amd.com
Subject: [tip:perf/urgent] perf, x86: Fix incorrect branches event on AMD CPUs
Date: Sat, 3 Jul 2010 13:58:23 GMT [thread overview]
Message-ID: <tip-f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1007011526010.23160@cl320.eecs.utk.edu>
Commit-ID: f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2
Gitweb: http://git.kernel.org/tip/f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2
Author: Vince Weaver <vweaver1@eecs.utk.edu>
AuthorDate: Thu, 1 Jul 2010 15:30:16 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 3 Jul 2010 15:19:34 +0200
perf, x86: Fix incorrect branches event on AMD CPUs
While doing some performance counter validation tests on some
assembly language programs I noticed that the "branches:u"
count was very wrong on AMD machines.
It looks like the wrong event was selected.
Signed-off-by: Vince Weaver <vweaver1@eecs.utk.edu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <alpine.DEB.2.00.1007011526010.23160@cl320.eecs.utk.edu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_event_amd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 611df11..c2897b7 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -102,8 +102,8 @@ static const u64 amd_perfmon_event_map[] =
[PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0,
[PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080,
[PERF_COUNT_HW_CACHE_MISSES] = 0x0081,
- [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4,
- [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5,
+ [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2,
+ [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3,
};
static u64 amd_pmu_event_map(int hw_event)
prev parent reply other threads:[~2010-07-03 13:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 19:30 [PATCH] perf wrong branches event on AMD Vince Weaver
2010-07-01 19:54 ` Arnaldo Carvalho de Melo
2010-07-02 11:38 ` Peter Zijlstra
2010-07-02 13:56 ` Vince Weaver
2010-07-02 14:23 ` Peter Zijlstra
2010-07-02 19:52 ` Vince Weaver
2010-07-03 13:54 ` Ingo Molnar
2010-07-04 0:30 ` David Dillow
2010-07-04 9:11 ` Ingo Molnar
2010-07-03 13:58 ` tip-bot for Vince Weaver [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2@git.kernel.org \
--to=vweaver1@eecs.utk.edu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=borislav.petkov@amd.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=robert.richter@amd.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox