projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c214909
)
perf, x86: Fix incorrect branches event on AMD CPUs
author
Vince Weaver
<
[email protected]
>
Thu, 1 Jul 2010 19:30:16 +0000
(15:30 -0400)
committer
Ingo Molnar
<
[email protected]
>
Sat, 3 Jul 2010 13:19:34 +0000
(15:19 +0200)
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 <
[email protected]
>
Acked-by: Peter Zijlstra <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Robert Richter <
[email protected]
>
Cc: Borislav Petkov <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Cc: <
[email protected]
>
LKML-Reference: <alpine.DEB.2.00.
1007011526010
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/cpu/perf_event_amd.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/perf_event_amd.c
b/arch/x86/kernel/cpu/perf_event_amd.c
index 611df11ba15e7f9145e49f2fa2c7e61b1371d77c..c2897b7b4a3b1c7a6cfe4fe7e70b3d7378432d4c 100644
(file)
--- 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] = 0x00c
4
,
- [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c
5
,
+ [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c
2
,
+ [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c
3
,
};
static u64 amd_pmu_event_map(int hw_event)