diff options
Diffstat (limited to 'arch/arm/kernel/perf_event_v7.c')
-rw-r--r-- | arch/arm/kernel/perf_event_v7.c | 401 |
1 files changed, 152 insertions, 249 deletions
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 1ef6d0034b8..460bbbb6b88 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -28,165 +28,87 @@ static struct arm_pmu armv7pmu; | |||
28 | * they are not available. | 28 | * they are not available. |
29 | */ | 29 | */ |
30 | enum armv7_perf_types { | 30 | enum armv7_perf_types { |
31 | ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, | 31 | ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, |
32 | ARMV7_PERFCTR_IFETCH_MISS = 0x01, | 32 | ARMV7_PERFCTR_L1_ICACHE_REFILL = 0x01, |
33 | ARMV7_PERFCTR_ITLB_MISS = 0x02, | 33 | ARMV7_PERFCTR_ITLB_REFILL = 0x02, |
34 | ARMV7_PERFCTR_DCACHE_REFILL = 0x03, /* L1 */ | 34 | ARMV7_PERFCTR_L1_DCACHE_REFILL = 0x03, |
35 | ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, /* L1 */ | 35 | ARMV7_PERFCTR_L1_DCACHE_ACCESS = 0x04, |
36 | ARMV7_PERFCTR_DTLB_REFILL = 0x05, | 36 | ARMV7_PERFCTR_DTLB_REFILL = 0x05, |
37 | ARMV7_PERFCTR_DREAD = 0x06, | 37 | ARMV7_PERFCTR_MEM_READ = 0x06, |
38 | ARMV7_PERFCTR_DWRITE = 0x07, | 38 | ARMV7_PERFCTR_MEM_WRITE = 0x07, |
39 | ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, | 39 | ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, |
40 | ARMV7_PERFCTR_EXC_TAKEN = 0x09, | 40 | ARMV7_PERFCTR_EXC_TAKEN = 0x09, |
41 | ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, | 41 | ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, |
42 | ARMV7_PERFCTR_CID_WRITE = 0x0B, | 42 | ARMV7_PERFCTR_CID_WRITE = 0x0B, |
43 | /* ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. | 43 | |
44 | /* | ||
45 | * ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. | ||
44 | * It counts: | 46 | * It counts: |
45 | * - all branch instructions, | 47 | * - all (taken) branch instructions, |
46 | * - instructions that explicitly write the PC, | 48 | * - instructions that explicitly write the PC, |
47 | * - exception generating instructions. | 49 | * - exception generating instructions. |
48 | */ | 50 | */ |
49 | ARMV7_PERFCTR_PC_WRITE = 0x0C, | 51 | ARMV7_PERFCTR_PC_WRITE = 0x0C, |
50 | ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, | 52 | ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, |
51 | ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, | 53 | ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, |
52 | ARMV7_PERFCTR_UNALIGNED_ACCESS = 0x0F, | 54 | ARMV7_PERFCTR_MEM_UNALIGNED_ACCESS = 0x0F, |
55 | ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, | ||
56 | ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, | ||
57 | ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, | ||
53 | 58 | ||
54 | /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ | 59 | /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ |
55 | ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, | 60 | ARMV7_PERFCTR_MEM_ACCESS = 0x13, |
56 | ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, | 61 | ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, |
57 | ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, | 62 | ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, |
58 | ARMV7_PERFCTR_MEM_ACCESS = 0x13, | 63 | ARMV7_PERFCTR_L2_CACHE_ACCESS = 0x16, |
59 | ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, | 64 | ARMV7_PERFCTR_L2_CACHE_REFILL = 0x17, |
60 | ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, | 65 | ARMV7_PERFCTR_L2_CACHE_WB = 0x18, |
61 | ARMV7_PERFCTR_L2_DCACHE_ACCESS = 0x16, | 66 | ARMV7_PERFCTR_BUS_ACCESS = 0x19, |
62 | ARMV7_PERFCTR_L2_DCACHE_REFILL = 0x17, | 67 | ARMV7_PERFCTR_MEM_ERROR = 0x1A, |
63 | ARMV7_PERFCTR_L2_DCACHE_WB = 0x18, | 68 | ARMV7_PERFCTR_INSTR_SPEC = 0x1B, |
64 | ARMV7_PERFCTR_BUS_ACCESS = 0x19, | 69 | ARMV7_PERFCTR_TTBR_WRITE = 0x1C, |
65 | ARMV7_PERFCTR_MEMORY_ERROR = 0x1A, | 70 | ARMV7_PERFCTR_BUS_CYCLES = 0x1D, |
66 | ARMV7_PERFCTR_INSTR_SPEC = 0x1B, | 71 | |
67 | ARMV7_PERFCTR_TTBR_WRITE = 0x1C, | 72 | ARMV7_PERFCTR_CPU_CYCLES = 0xFF |
68 | ARMV7_PERFCTR_BUS_CYCLES = 0x1D, | ||
69 | |||
70 | ARMV7_PERFCTR_CPU_CYCLES = 0xFF | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | /* ARMv7 Cortex-A8 specific event types */ | 75 | /* ARMv7 Cortex-A8 specific event types */ |
74 | enum armv7_a8_perf_types { | 76 | enum armv7_a8_perf_types { |
75 | ARMV7_PERFCTR_WRITE_BUFFER_FULL = 0x40, | 77 | ARMV7_A8_PERFCTR_L2_CACHE_ACCESS = 0x43, |
76 | ARMV7_PERFCTR_L2_STORE_MERGED = 0x41, | 78 | ARMV7_A8_PERFCTR_L2_CACHE_REFILL = 0x44, |
77 | ARMV7_PERFCTR_L2_STORE_BUFF = 0x42, | 79 | ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS = 0x50, |
78 | ARMV7_PERFCTR_L2_ACCESS = 0x43, | 80 | ARMV7_A8_PERFCTR_STALL_ISIDE = 0x56, |
79 | ARMV7_PERFCTR_L2_CACH_MISS = 0x44, | ||
80 | ARMV7_PERFCTR_AXI_READ_CYCLES = 0x45, | ||
81 | ARMV7_PERFCTR_AXI_WRITE_CYCLES = 0x46, | ||
82 | ARMV7_PERFCTR_MEMORY_REPLAY = 0x47, | ||
83 | ARMV7_PERFCTR_UNALIGNED_ACCESS_REPLAY = 0x48, | ||
84 | ARMV7_PERFCTR_L1_DATA_MISS = 0x49, | ||
85 | ARMV7_PERFCTR_L1_INST_MISS = 0x4A, | ||
86 | ARMV7_PERFCTR_L1_DATA_COLORING = 0x4B, | ||
87 | ARMV7_PERFCTR_L1_NEON_DATA = 0x4C, | ||
88 | ARMV7_PERFCTR_L1_NEON_CACH_DATA = 0x4D, | ||
89 | ARMV7_PERFCTR_L2_NEON = 0x4E, | ||
90 | ARMV7_PERFCTR_L2_NEON_HIT = 0x4F, | ||
91 | ARMV7_PERFCTR_L1_INST = 0x50, | ||
92 | ARMV7_PERFCTR_PC_RETURN_MIS_PRED = 0x51, | ||
93 | ARMV7_PERFCTR_PC_BRANCH_FAILED = 0x52, | ||
94 | ARMV7_PERFCTR_PC_BRANCH_TAKEN = 0x53, | ||
95 | ARMV7_PERFCTR_PC_BRANCH_EXECUTED = 0x54, | ||
96 | ARMV7_PERFCTR_OP_EXECUTED = 0x55, | ||
97 | ARMV7_PERFCTR_CYCLES_INST_STALL = 0x56, | ||
98 | ARMV7_PERFCTR_CYCLES_INST = 0x57, | ||
99 | ARMV7_PERFCTR_CYCLES_NEON_DATA_STALL = 0x58, | ||
100 | ARMV7_PERFCTR_CYCLES_NEON_INST_STALL = 0x59, | ||
101 | ARMV7_PERFCTR_NEON_CYCLES = 0x5A, | ||
102 | |||
103 | ARMV7_PERFCTR_PMU0_EVENTS = 0x70, | ||
104 | ARMV7_PERFCTR_PMU1_EVENTS = 0x71, | ||
105 | ARMV7_PERFCTR_PMU_EVENTS = 0x72, | ||
106 | }; | 81 | }; |
107 | 82 | ||
108 | /* ARMv7 Cortex-A9 specific event types */ | 83 | /* ARMv7 Cortex-A9 specific event types */ |
109 | enum armv7_a9_perf_types { | 84 | enum armv7_a9_perf_types { |
110 | ARMV7_PERFCTR_JAVA_HW_BYTECODE_EXEC = 0x40, | 85 | ARMV7_A9_PERFCTR_INSTR_CORE_RENAME = 0x68, |
111 | ARMV7_PERFCTR_JAVA_SW_BYTECODE_EXEC = 0x41, | 86 | ARMV7_A9_PERFCTR_STALL_ICACHE = 0x60, |
112 | ARMV7_PERFCTR_JAZELLE_BRANCH_EXEC = 0x42, | 87 | ARMV7_A9_PERFCTR_STALL_DISPATCH = 0x66, |
113 | |||
114 | ARMV7_PERFCTR_COHERENT_LINE_MISS = 0x50, | ||
115 | ARMV7_PERFCTR_COHERENT_LINE_HIT = 0x51, | ||
116 | |||
117 | ARMV7_PERFCTR_ICACHE_DEP_STALL_CYCLES = 0x60, | ||
118 | ARMV7_PERFCTR_DCACHE_DEP_STALL_CYCLES = 0x61, | ||
119 | ARMV7_PERFCTR_TLB_MISS_DEP_STALL_CYCLES = 0x62, | ||
120 | ARMV7_PERFCTR_STREX_EXECUTED_PASSED = 0x63, | ||
121 | ARMV7_PERFCTR_STREX_EXECUTED_FAILED = 0x64, | ||
122 | ARMV7_PERFCTR_DATA_EVICTION = 0x65, | ||
123 | ARMV7_PERFCTR_ISSUE_STAGE_NO_INST = 0x66, | ||
124 | ARMV7_PERFCTR_ISSUE_STAGE_EMPTY = 0x67, | ||
125 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE = 0x68, | ||
126 | |||
127 | ARMV7_PERFCTR_PREDICTABLE_FUNCT_RETURNS = 0x6E, | ||
128 | |||
129 | ARMV7_PERFCTR_MAIN_UNIT_EXECUTED_INST = 0x70, | ||
130 | ARMV7_PERFCTR_SECOND_UNIT_EXECUTED_INST = 0x71, | ||
131 | ARMV7_PERFCTR_LD_ST_UNIT_EXECUTED_INST = 0x72, | ||
132 | ARMV7_PERFCTR_FP_EXECUTED_INST = 0x73, | ||
133 | ARMV7_PERFCTR_NEON_EXECUTED_INST = 0x74, | ||
134 | |||
135 | ARMV7_PERFCTR_PLD_FULL_DEP_STALL_CYCLES = 0x80, | ||
136 | ARMV7_PERFCTR_DATA_WR_DEP_STALL_CYCLES = 0x81, | ||
137 | ARMV7_PERFCTR_ITLB_MISS_DEP_STALL_CYCLES = 0x82, | ||
138 | ARMV7_PERFCTR_DTLB_MISS_DEP_STALL_CYCLES = 0x83, | ||
139 | ARMV7_PERFCTR_MICRO_ITLB_MISS_DEP_STALL_CYCLES = 0x84, | ||
140 | ARMV7_PERFCTR_MICRO_DTLB_MISS_DEP_STALL_CYCLES = 0x85, | ||
141 | ARMV7_PERFCTR_DMB_DEP_STALL_CYCLES = 0x86, | ||
142 | |||
143 | ARMV7_PERFCTR_INTGR_CLK_ENABLED_CYCLES = 0x8A, | ||
144 | ARMV7_PERFCTR_DATA_ENGINE_CLK_EN_CYCLES = 0x8B, | ||
145 | |||
146 | ARMV7_PERFCTR_ISB_INST = 0x90, | ||
147 | ARMV7_PERFCTR_DSB_INST = 0x91, | ||
148 | ARMV7_PERFCTR_DMB_INST = 0x92, | ||
149 | ARMV7_PERFCTR_EXT_INTERRUPTS = 0x93, | ||
150 | |||
151 | ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_COMPLETED = 0xA0, | ||
152 | ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_SKIPPED = 0xA1, | ||
153 | ARMV7_PERFCTR_PLE_FIFO_FLUSH = 0xA2, | ||
154 | ARMV7_PERFCTR_PLE_RQST_COMPLETED = 0xA3, | ||
155 | ARMV7_PERFCTR_PLE_FIFO_OVERFLOW = 0xA4, | ||
156 | ARMV7_PERFCTR_PLE_RQST_PROG = 0xA5 | ||
157 | }; | 88 | }; |
158 | 89 | ||
159 | /* ARMv7 Cortex-A5 specific event types */ | 90 | /* ARMv7 Cortex-A5 specific event types */ |
160 | enum armv7_a5_perf_types { | 91 | enum armv7_a5_perf_types { |
161 | ARMV7_PERFCTR_IRQ_TAKEN = 0x86, | 92 | ARMV7_A5_PERFCTR_PREFETCH_LINEFILL = 0xc2, |
162 | ARMV7_PERFCTR_FIQ_TAKEN = 0x87, | 93 | ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, |
163 | |||
164 | ARMV7_PERFCTR_EXT_MEM_RQST = 0xc0, | ||
165 | ARMV7_PERFCTR_NC_EXT_MEM_RQST = 0xc1, | ||
166 | ARMV7_PERFCTR_PREFETCH_LINEFILL = 0xc2, | ||
167 | ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, | ||
168 | ARMV7_PERFCTR_ENTER_READ_ALLOC = 0xc4, | ||
169 | ARMV7_PERFCTR_READ_ALLOC = 0xc5, | ||
170 | |||
171 | ARMV7_PERFCTR_STALL_SB_FULL = 0xc9, | ||
172 | }; | 94 | }; |
173 | 95 | ||
174 | /* ARMv7 Cortex-A15 specific event types */ | 96 | /* ARMv7 Cortex-A15 specific event types */ |
175 | enum armv7_a15_perf_types { | 97 | enum armv7_a15_perf_types { |
176 | ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS = 0x40, | 98 | ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40, |
177 | ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS = 0x41, | 99 | ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE = 0x41, |
178 | ARMV7_PERFCTR_L1_DCACHE_READ_REFILL = 0x42, | 100 | ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42, |
179 | ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL = 0x43, | 101 | ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE = 0x43, |
180 | 102 | ||
181 | ARMV7_PERFCTR_L1_DTLB_READ_REFILL = 0x4C, | 103 | ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ = 0x4C, |
182 | ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL = 0x4D, | 104 | ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE = 0x4D, |
183 | 105 | ||
184 | ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS = 0x50, | 106 | ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ = 0x50, |
185 | ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS = 0x51, | 107 | ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE = 0x51, |
186 | ARMV7_PERFCTR_L2_DCACHE_READ_REFILL = 0x52, | 108 | ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ = 0x52, |
187 | ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL = 0x53, | 109 | ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE = 0x53, |
188 | 110 | ||
189 | ARMV7_PERFCTR_SPEC_PC_WRITE = 0x76, | 111 | ARMV7_A15_PERFCTR_PC_WRITE_SPEC = 0x76, |
190 | }; | 112 | }; |
191 | 113 | ||
192 | /* | 114 | /* |
@@ -197,13 +119,15 @@ enum armv7_a15_perf_types { | |||
197 | * accesses/misses in hardware. | 119 | * accesses/misses in hardware. |
198 | */ | 120 | */ |
199 | static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = { | 121 | static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = { |
200 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 122 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
201 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 123 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
202 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 124 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
203 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 125 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
204 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 126 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
205 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 127 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
206 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | 128 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
129 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE, | ||
130 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
207 | }; | 131 | }; |
208 | 132 | ||
209 | static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 133 | static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -217,12 +141,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
217 | * combined. | 141 | * combined. |
218 | */ | 142 | */ |
219 | [C(OP_READ)] = { | 143 | [C(OP_READ)] = { |
220 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 144 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
221 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 145 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
222 | }, | 146 | }, |
223 | [C(OP_WRITE)] = { | 147 | [C(OP_WRITE)] = { |
224 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 148 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
225 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 149 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
226 | }, | 150 | }, |
227 | [C(OP_PREFETCH)] = { | 151 | [C(OP_PREFETCH)] = { |
228 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 152 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -231,12 +155,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
231 | }, | 155 | }, |
232 | [C(L1I)] = { | 156 | [C(L1I)] = { |
233 | [C(OP_READ)] = { | 157 | [C(OP_READ)] = { |
234 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, | 158 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, |
235 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, | 159 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
236 | }, | 160 | }, |
237 | [C(OP_WRITE)] = { | 161 | [C(OP_WRITE)] = { |
238 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, | 162 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, |
239 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, | 163 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
240 | }, | 164 | }, |
241 | [C(OP_PREFETCH)] = { | 165 | [C(OP_PREFETCH)] = { |
242 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 166 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -245,12 +169,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
245 | }, | 169 | }, |
246 | [C(LL)] = { | 170 | [C(LL)] = { |
247 | [C(OP_READ)] = { | 171 | [C(OP_READ)] = { |
248 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, | 172 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, |
249 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, | 173 | [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, |
250 | }, | 174 | }, |
251 | [C(OP_WRITE)] = { | 175 | [C(OP_WRITE)] = { |
252 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, | 176 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, |
253 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, | 177 | [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, |
254 | }, | 178 | }, |
255 | [C(OP_PREFETCH)] = { | 179 | [C(OP_PREFETCH)] = { |
256 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 180 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -274,11 +198,11 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
274 | [C(ITLB)] = { | 198 | [C(ITLB)] = { |
275 | [C(OP_READ)] = { | 199 | [C(OP_READ)] = { |
276 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 200 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
277 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 201 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
278 | }, | 202 | }, |
279 | [C(OP_WRITE)] = { | 203 | [C(OP_WRITE)] = { |
280 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 204 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
281 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 205 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
282 | }, | 206 | }, |
283 | [C(OP_PREFETCH)] = { | 207 | [C(OP_PREFETCH)] = { |
284 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 208 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -287,14 +211,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
287 | }, | 211 | }, |
288 | [C(BPU)] = { | 212 | [C(BPU)] = { |
289 | [C(OP_READ)] = { | 213 | [C(OP_READ)] = { |
290 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 214 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
291 | [C(RESULT_MISS)] | 215 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
292 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
293 | }, | 216 | }, |
294 | [C(OP_WRITE)] = { | 217 | [C(OP_WRITE)] = { |
295 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 218 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
296 | [C(RESULT_MISS)] | 219 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
297 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
298 | }, | 220 | }, |
299 | [C(OP_PREFETCH)] = { | 221 | [C(OP_PREFETCH)] = { |
300 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 222 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -321,14 +243,15 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
321 | * Cortex-A9 HW events mapping | 243 | * Cortex-A9 HW events mapping |
322 | */ | 244 | */ |
323 | static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { | 245 | static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { |
324 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 246 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
325 | [PERF_COUNT_HW_INSTRUCTIONS] = | 247 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_A9_PERFCTR_INSTR_CORE_RENAME, |
326 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, | 248 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
327 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS, | 249 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
328 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL, | 250 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
329 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 251 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
330 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 252 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
331 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | 253 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE, |
254 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV7_A9_PERFCTR_STALL_DISPATCH, | ||
332 | }; | 255 | }; |
333 | 256 | ||
334 | static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 257 | static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -342,12 +265,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
342 | * combined. | 265 | * combined. |
343 | */ | 266 | */ |
344 | [C(OP_READ)] = { | 267 | [C(OP_READ)] = { |
345 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 268 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
346 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 269 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
347 | }, | 270 | }, |
348 | [C(OP_WRITE)] = { | 271 | [C(OP_WRITE)] = { |
349 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 272 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
350 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 273 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
351 | }, | 274 | }, |
352 | [C(OP_PREFETCH)] = { | 275 | [C(OP_PREFETCH)] = { |
353 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 276 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -357,11 +280,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
357 | [C(L1I)] = { | 280 | [C(L1I)] = { |
358 | [C(OP_READ)] = { | 281 | [C(OP_READ)] = { |
359 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 282 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
360 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 283 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
361 | }, | 284 | }, |
362 | [C(OP_WRITE)] = { | 285 | [C(OP_WRITE)] = { |
363 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 286 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
364 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 287 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
365 | }, | 288 | }, |
366 | [C(OP_PREFETCH)] = { | 289 | [C(OP_PREFETCH)] = { |
367 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 290 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -399,11 +322,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
399 | [C(ITLB)] = { | 322 | [C(ITLB)] = { |
400 | [C(OP_READ)] = { | 323 | [C(OP_READ)] = { |
401 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 324 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
402 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 325 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
403 | }, | 326 | }, |
404 | [C(OP_WRITE)] = { | 327 | [C(OP_WRITE)] = { |
405 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 328 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
406 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 329 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
407 | }, | 330 | }, |
408 | [C(OP_PREFETCH)] = { | 331 | [C(OP_PREFETCH)] = { |
409 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 332 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -412,14 +335,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
412 | }, | 335 | }, |
413 | [C(BPU)] = { | 336 | [C(BPU)] = { |
414 | [C(OP_READ)] = { | 337 | [C(OP_READ)] = { |
415 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 338 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
416 | [C(RESULT_MISS)] | 339 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
417 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
418 | }, | 340 | }, |
419 | [C(OP_WRITE)] = { | 341 | [C(OP_WRITE)] = { |
420 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 342 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
421 | [C(RESULT_MISS)] | 343 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
422 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
423 | }, | 344 | }, |
424 | [C(OP_PREFETCH)] = { | 345 | [C(OP_PREFETCH)] = { |
425 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 346 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -446,13 +367,15 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
446 | * Cortex-A5 HW events mapping | 367 | * Cortex-A5 HW events mapping |
447 | */ | 368 | */ |
448 | static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { | 369 | static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { |
449 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 370 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
450 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 371 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
451 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 372 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
452 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 373 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
453 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 374 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
454 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 375 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
455 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, | 376 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
377 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, | ||
378 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
456 | }; | 379 | }; |
457 | 380 | ||
458 | static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 381 | static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -460,42 +383,34 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
460 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | 383 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { |
461 | [C(L1D)] = { | 384 | [C(L1D)] = { |
462 | [C(OP_READ)] = { | 385 | [C(OP_READ)] = { |
463 | [C(RESULT_ACCESS)] | 386 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
464 | = ARMV7_PERFCTR_DCACHE_ACCESS, | 387 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
465 | [C(RESULT_MISS)] | ||
466 | = ARMV7_PERFCTR_DCACHE_REFILL, | ||
467 | }, | 388 | }, |
468 | [C(OP_WRITE)] = { | 389 | [C(OP_WRITE)] = { |
469 | [C(RESULT_ACCESS)] | 390 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
470 | = ARMV7_PERFCTR_DCACHE_ACCESS, | 391 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
471 | [C(RESULT_MISS)] | ||
472 | = ARMV7_PERFCTR_DCACHE_REFILL, | ||
473 | }, | 392 | }, |
474 | [C(OP_PREFETCH)] = { | 393 | [C(OP_PREFETCH)] = { |
475 | [C(RESULT_ACCESS)] | 394 | [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, |
476 | = ARMV7_PERFCTR_PREFETCH_LINEFILL, | 395 | [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, |
477 | [C(RESULT_MISS)] | ||
478 | = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, | ||
479 | }, | 396 | }, |
480 | }, | 397 | }, |
481 | [C(L1I)] = { | 398 | [C(L1I)] = { |
482 | [C(OP_READ)] = { | 399 | [C(OP_READ)] = { |
483 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 400 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
484 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 401 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
485 | }, | 402 | }, |
486 | [C(OP_WRITE)] = { | 403 | [C(OP_WRITE)] = { |
487 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 404 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
488 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 405 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
489 | }, | 406 | }, |
490 | /* | 407 | /* |
491 | * The prefetch counters don't differentiate between the I | 408 | * The prefetch counters don't differentiate between the I |
492 | * side and the D side. | 409 | * side and the D side. |
493 | */ | 410 | */ |
494 | [C(OP_PREFETCH)] = { | 411 | [C(OP_PREFETCH)] = { |
495 | [C(RESULT_ACCESS)] | 412 | [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, |
496 | = ARMV7_PERFCTR_PREFETCH_LINEFILL, | 413 | [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, |
497 | [C(RESULT_MISS)] | ||
498 | = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, | ||
499 | }, | 414 | }, |
500 | }, | 415 | }, |
501 | [C(LL)] = { | 416 | [C(LL)] = { |
@@ -529,11 +444,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
529 | [C(ITLB)] = { | 444 | [C(ITLB)] = { |
530 | [C(OP_READ)] = { | 445 | [C(OP_READ)] = { |
531 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 446 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
532 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 447 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
533 | }, | 448 | }, |
534 | [C(OP_WRITE)] = { | 449 | [C(OP_WRITE)] = { |
535 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 450 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
536 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 451 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
537 | }, | 452 | }, |
538 | [C(OP_PREFETCH)] = { | 453 | [C(OP_PREFETCH)] = { |
539 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 454 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -543,13 +458,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
543 | [C(BPU)] = { | 458 | [C(BPU)] = { |
544 | [C(OP_READ)] = { | 459 | [C(OP_READ)] = { |
545 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 460 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
546 | [C(RESULT_MISS)] | 461 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
547 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
548 | }, | 462 | }, |
549 | [C(OP_WRITE)] = { | 463 | [C(OP_WRITE)] = { |
550 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 464 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
551 | [C(RESULT_MISS)] | 465 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
552 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
553 | }, | 466 | }, |
554 | [C(OP_PREFETCH)] = { | 467 | [C(OP_PREFETCH)] = { |
555 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 468 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -562,13 +475,15 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
562 | * Cortex-A15 HW events mapping | 475 | * Cortex-A15 HW events mapping |
563 | */ | 476 | */ |
564 | static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { | 477 | static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { |
565 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 478 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
566 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 479 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
567 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 480 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
568 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 481 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
569 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_SPEC_PC_WRITE, | 482 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_A15_PERFCTR_PC_WRITE_SPEC, |
570 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 483 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
571 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, | 484 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, |
485 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, | ||
486 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
572 | }; | 487 | }; |
573 | 488 | ||
574 | static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 489 | static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -576,16 +491,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
576 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | 491 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { |
577 | [C(L1D)] = { | 492 | [C(L1D)] = { |
578 | [C(OP_READ)] = { | 493 | [C(OP_READ)] = { |
579 | [C(RESULT_ACCESS)] | 494 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ, |
580 | = ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS, | 495 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ, |
581 | [C(RESULT_MISS)] | ||
582 | = ARMV7_PERFCTR_L1_DCACHE_READ_REFILL, | ||
583 | }, | 496 | }, |
584 | [C(OP_WRITE)] = { | 497 | [C(OP_WRITE)] = { |
585 | [C(RESULT_ACCESS)] | 498 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE, |
586 | = ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS, | 499 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE, |
587 | [C(RESULT_MISS)] | ||
588 | = ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL, | ||
589 | }, | 500 | }, |
590 | [C(OP_PREFETCH)] = { | 501 | [C(OP_PREFETCH)] = { |
591 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 502 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -601,11 +512,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
601 | */ | 512 | */ |
602 | [C(OP_READ)] = { | 513 | [C(OP_READ)] = { |
603 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 514 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
604 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 515 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
605 | }, | 516 | }, |
606 | [C(OP_WRITE)] = { | 517 | [C(OP_WRITE)] = { |
607 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 518 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
608 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 519 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
609 | }, | 520 | }, |
610 | [C(OP_PREFETCH)] = { | 521 | [C(OP_PREFETCH)] = { |
611 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 522 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -614,16 +525,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
614 | }, | 525 | }, |
615 | [C(LL)] = { | 526 | [C(LL)] = { |
616 | [C(OP_READ)] = { | 527 | [C(OP_READ)] = { |
617 | [C(RESULT_ACCESS)] | 528 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ, |
618 | = ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS, | 529 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ, |
619 | [C(RESULT_MISS)] | ||
620 | = ARMV7_PERFCTR_L2_DCACHE_READ_REFILL, | ||
621 | }, | 530 | }, |
622 | [C(OP_WRITE)] = { | 531 | [C(OP_WRITE)] = { |
623 | [C(RESULT_ACCESS)] | 532 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE, |
624 | = ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS, | 533 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE, |
625 | [C(RESULT_MISS)] | ||
626 | = ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL, | ||
627 | }, | 534 | }, |
628 | [C(OP_PREFETCH)] = { | 535 | [C(OP_PREFETCH)] = { |
629 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 536 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -633,13 +540,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
633 | [C(DTLB)] = { | 540 | [C(DTLB)] = { |
634 | [C(OP_READ)] = { | 541 | [C(OP_READ)] = { |
635 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 542 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
636 | [C(RESULT_MISS)] | 543 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ, |
637 | = ARMV7_PERFCTR_L1_DTLB_READ_REFILL, | ||
638 | }, | 544 | }, |
639 | [C(OP_WRITE)] = { | 545 | [C(OP_WRITE)] = { |
640 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 546 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
641 | [C(RESULT_MISS)] | 547 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE, |
642 | = ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL, | ||
643 | }, | 548 | }, |
644 | [C(OP_PREFETCH)] = { | 549 | [C(OP_PREFETCH)] = { |
645 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 550 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -649,11 +554,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
649 | [C(ITLB)] = { | 554 | [C(ITLB)] = { |
650 | [C(OP_READ)] = { | 555 | [C(OP_READ)] = { |
651 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 556 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
652 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 557 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
653 | }, | 558 | }, |
654 | [C(OP_WRITE)] = { | 559 | [C(OP_WRITE)] = { |
655 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 560 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
656 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 561 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
657 | }, | 562 | }, |
658 | [C(OP_PREFETCH)] = { | 563 | [C(OP_PREFETCH)] = { |
659 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 564 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -663,13 +568,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
663 | [C(BPU)] = { | 568 | [C(BPU)] = { |
664 | [C(OP_READ)] = { | 569 | [C(OP_READ)] = { |
665 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 570 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
666 | [C(RESULT_MISS)] | 571 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
667 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
668 | }, | 572 | }, |
669 | [C(OP_WRITE)] = { | 573 | [C(OP_WRITE)] = { |
670 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 574 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
671 | [C(RESULT_MISS)] | 575 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
672 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
673 | }, | 576 | }, |
674 | [C(OP_PREFETCH)] = { | 577 | [C(OP_PREFETCH)] = { |
675 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 578 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |