Skip to contentSkip to conversation

perf, x86: Fix key index in Pentium-4 PMU

PATCH In review Lin Ming 1 participant 2 messages Mar 19, 2010 x86

lore
Share & tools
lore

Lin Ming

author
#0 lore raw

PATCH 1/1 perf, x86: Fix key index in Pentium-4 PMU

Index 0-6 in p4_templates are reserved for common hardware events. So p4_templates is arranged as below,
0 - 6: common hardware events
7 - N: cache events
N+1 - ...: other raw events

---
 arch/x86/include/asm/perf_event_p4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/perf_event_p4.h +1 -1
index 2a1a57f..facf961 100644
@@ -709,7 +709,7 @@ enum P4_EVENTS_ATTR {
 };
 
 enum {
-	KEY_P4_L1D_OP_READ_RESULT_MISS,
+	KEY_P4_L1D_OP_READ_RESULT_MISS = PERF_COUNT_HW_MAX,
 	KEY_P4_LL_OP_READ_RESULT_MISS,
 	KEY_P4_DTLB_OP_READ_RESULT_MISS,
 	KEY_P4_DTLB_OP_WRITE_RESULT_MISS,
#1 lore raw

[tip:perf/core] perf, x86: Fix key indexing in Pentium-4 PMU

Commit-ID:  40b7e05e17eef31ff30fe08dfc2424ef653a792c
Gitweb:     http://git.kernel.org/tip/40b7e05e17eef31ff30fe08dfc2424ef653a792c
Author:     Lin Ming <[email protected]>
AuthorDate: Fri, 19 Mar 2010 15:28:58 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 19 Mar 2010 09:23:17 +0100

perf, x86: Fix key indexing in Pentium-4 PMU

Index 0-6 in p4_templates are reserved for common hardware events. So p4_templates is arranged as below:

    0  -    6:  common hardware events
    7  -    N:  cache events
  N+1  -  ...:  other raw events

LKML-Reference: <[email protected]>

---
 arch/x86/include/asm/perf_event_p4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/perf_event_p4.h +1 -1
index 2a1a57f..facf961 100644
@@ -709,7 +709,7 @@ enum P4_EVENTS_ATTR {
 };
 
 enum {
-	KEY_P4_L1D_OP_READ_RESULT_MISS,
+	KEY_P4_L1D_OP_READ_RESULT_MISS = PERF_COUNT_HW_MAX,
 	KEY_P4_LL_OP_READ_RESULT_MISS,
 	KEY_P4_DTLB_OP_READ_RESULT_MISS,
 	KEY_P4_DTLB_OP_WRITE_RESULT_MISS,