xref: /freebsd/sys/dev/hwpmc/pmc_events.h (revision 39beb93c3f8bdbf72a61fda42300b5ebed7390c8)
1 /*-
2  * Copyright (c) 2005  Joseph Koshy
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD$
27  */
28 
29 #ifndef _DEV_HWPMC_PMC_EVENTS_H_
30 #define	_DEV_HWPMC_PMC_EVENTS_H_
31 
32 /*
33  * PMC event codes.
34  *
35  * __PMC_EV(CLASS, SYMBOLIC-NAME)
36  *
37  */
38 
39 /*
40  * AMD K7 Events, from "The AMD Athlon(tm) Processor x86 Code
41  * Optimization Guide" [Doc#22007K, Feb 2002]
42  */
43 
44 #define	__PMC_EV_K7()					\
45 __PMC_EV(K7, DC_ACCESSES)				\
46 __PMC_EV(K7, DC_MISSES)					\
47 __PMC_EV(K7, DC_REFILLS_FROM_L2)			\
48 __PMC_EV(K7, DC_REFILLS_FROM_SYSTEM)			\
49 __PMC_EV(K7, DC_WRITEBACKS)				\
50 __PMC_EV(K7, L1_DTLB_MISS_AND_L2_DTLB_HITS)		\
51 __PMC_EV(K7, L1_AND_L2_DTLB_MISSES)			\
52 __PMC_EV(K7, MISALIGNED_REFERENCES)			\
53 __PMC_EV(K7, IC_FETCHES)				\
54 __PMC_EV(K7, IC_MISSES)					\
55 __PMC_EV(K7, L1_ITLB_MISSES)				\
56 __PMC_EV(K7, L1_L2_ITLB_MISSES)				\
57 __PMC_EV(K7, RETIRED_INSTRUCTIONS)			\
58 __PMC_EV(K7, RETIRED_OPS)				\
59 __PMC_EV(K7, RETIRED_BRANCHES)				\
60 __PMC_EV(K7, RETIRED_BRANCHES_MISPREDICTED)		\
61 __PMC_EV(K7, RETIRED_TAKEN_BRANCHES)			\
62 __PMC_EV(K7, RETIRED_TAKEN_BRANCHES_MISPREDICTED)	\
63 __PMC_EV(K7, RETIRED_FAR_CONTROL_TRANSFERS)		\
64 __PMC_EV(K7, RETIRED_RESYNC_BRANCHES)			\
65 __PMC_EV(K7, INTERRUPTS_MASKED_CYCLES)			\
66 __PMC_EV(K7, INTERRUPTS_MASKED_WHILE_PENDING_CYCLES)	\
67 __PMC_EV(K7, HARDWARE_INTERRUPTS)
68 
69 #define	PMC_EV_K7_FIRST	PMC_EV_K7_DC_ACCESSES
70 #define	PMC_EV_K7_LAST	PMC_EV_K7_HARDWARE_INTERRUPTS
71 
72 
73 /*
74  * Intel P4 Events, from "IA-32 Intel(r) Architecture Software
75  * Developer's Manual, Volume 3: System Programming Guide" [245472-012]
76  */
77 
78 #define	__PMC_EV_P4()				\
79 __PMC_EV(P4, TC_DELIVER_MODE)			\
80 __PMC_EV(P4, BPU_FETCH_REQUEST)			\
81 __PMC_EV(P4, ITLB_REFERENCE)			\
82 __PMC_EV(P4, MEMORY_CANCEL)			\
83 __PMC_EV(P4, MEMORY_COMPLETE)			\
84 __PMC_EV(P4, LOAD_PORT_REPLAY)			\
85 __PMC_EV(P4, STORE_PORT_REPLAY)			\
86 __PMC_EV(P4, MOB_LOAD_REPLAY)			\
87 __PMC_EV(P4, PAGE_WALK_TYPE)			\
88 __PMC_EV(P4, BSQ_CACHE_REFERENCE)		\
89 __PMC_EV(P4, IOQ_ALLOCATION)			\
90 __PMC_EV(P4, IOQ_ACTIVE_ENTRIES)		\
91 __PMC_EV(P4, FSB_DATA_ACTIVITY)			\
92 __PMC_EV(P4, BSQ_ALLOCATION)			\
93 __PMC_EV(P4, BSQ_ACTIVE_ENTRIES)		\
94 __PMC_EV(P4, SSE_INPUT_ASSIST)			\
95 __PMC_EV(P4, PACKED_SP_UOP)			\
96 __PMC_EV(P4, PACKED_DP_UOP)			\
97 __PMC_EV(P4, SCALAR_SP_UOP)			\
98 __PMC_EV(P4, SCALAR_DP_UOP)			\
99 __PMC_EV(P4, 64BIT_MMX_UOP)			\
100 __PMC_EV(P4, 128BIT_MMX_UOP)			\
101 __PMC_EV(P4, X87_FP_UOP)			\
102 __PMC_EV(P4, X87_SIMD_MOVES_UOP)		\
103 __PMC_EV(P4, GLOBAL_POWER_EVENTS)		\
104 __PMC_EV(P4, TC_MS_XFER)			\
105 __PMC_EV(P4, UOP_QUEUE_WRITES)			\
106 __PMC_EV(P4, RETIRED_MISPRED_BRANCH_TYPE)	\
107 __PMC_EV(P4, RETIRED_BRANCH_TYPE)		\
108 __PMC_EV(P4, RESOURCE_STALL)			\
109 __PMC_EV(P4, WC_BUFFER)				\
110 __PMC_EV(P4, B2B_CYCLES)			\
111 __PMC_EV(P4, BNR)				\
112 __PMC_EV(P4, SNOOP)				\
113 __PMC_EV(P4, RESPONSE)				\
114 __PMC_EV(P4, FRONT_END_EVENT)			\
115 __PMC_EV(P4, EXECUTION_EVENT)			\
116 __PMC_EV(P4, REPLAY_EVENT)			\
117 __PMC_EV(P4, INSTR_RETIRED)			\
118 __PMC_EV(P4, UOPS_RETIRED)			\
119 __PMC_EV(P4, UOP_TYPE)				\
120 __PMC_EV(P4, BRANCH_RETIRED)			\
121 __PMC_EV(P4, MISPRED_BRANCH_RETIRED)		\
122 __PMC_EV(P4, X87_ASSIST)			\
123 __PMC_EV(P4, MACHINE_CLEAR)
124 
125 #define	PMC_EV_P4_FIRST PMC_EV_P4_TC_DELIVER_MODE
126 #define	PMC_EV_P4_LAST	PMC_EV_P4_MACHINE_CLEAR
127 
128 /* Intel Pentium Pro, P-II, P-III and Pentium-M style events */
129 
130 #define	__PMC_EV_P6()				\
131 __PMC_EV(P6, DATA_MEM_REFS)			\
132 __PMC_EV(P6, DCU_LINES_IN)			\
133 __PMC_EV(P6, DCU_M_LINES_IN)			\
134 __PMC_EV(P6, DCU_M_LINES_OUT)			\
135 __PMC_EV(P6, DCU_MISS_OUTSTANDING)		\
136 __PMC_EV(P6, IFU_FETCH)				\
137 __PMC_EV(P6, IFU_FETCH_MISS)			\
138 __PMC_EV(P6, ITLB_MISS)				\
139 __PMC_EV(P6, IFU_MEM_STALL)			\
140 __PMC_EV(P6, ILD_STALL)				\
141 __PMC_EV(P6, L2_IFETCH)				\
142 __PMC_EV(P6, L2_LD)				\
143 __PMC_EV(P6, L2_ST)				\
144 __PMC_EV(P6, L2_LINES_IN)			\
145 __PMC_EV(P6, L2_LINES_OUT)			\
146 __PMC_EV(P6, L2_M_LINES_INM)			\
147 __PMC_EV(P6, L2_M_LINES_OUTM)			\
148 __PMC_EV(P6, L2_RQSTS)				\
149 __PMC_EV(P6, L2_ADS)				\
150 __PMC_EV(P6, L2_DBUS_BUSY)			\
151 __PMC_EV(P6, L2_DBUS_BUSY_RD)			\
152 __PMC_EV(P6, BUS_DRDY_CLOCKS)			\
153 __PMC_EV(P6, BUS_LOCK_CLOCKS)			\
154 __PMC_EV(P6, BUS_REQ_OUTSTANDING)		\
155 __PMC_EV(P6, BUS_TRAN_BRD)			\
156 __PMC_EV(P6, BUS_TRAN_RFO)			\
157 __PMC_EV(P6, BUS_TRANS_WB)			\
158 __PMC_EV(P6, BUS_TRAN_IFETCH)			\
159 __PMC_EV(P6, BUS_TRAN_INVAL)			\
160 __PMC_EV(P6, BUS_TRAN_PWR)			\
161 __PMC_EV(P6, BUS_TRANS_P)			\
162 __PMC_EV(P6, BUS_TRANS_IO)			\
163 __PMC_EV(P6, BUS_TRAN_DEF)			\
164 __PMC_EV(P6, BUS_TRAN_BURST)			\
165 __PMC_EV(P6, BUS_TRAN_ANY)			\
166 __PMC_EV(P6, BUS_TRAN_MEM)			\
167 __PMC_EV(P6, BUS_DATA_RCV)			\
168 __PMC_EV(P6, BUS_BNR_DRV)			\
169 __PMC_EV(P6, BUS_HIT_DRV)			\
170 __PMC_EV(P6, BUS_HITM_DRV)			\
171 __PMC_EV(P6, BUS_SNOOP_STALL)			\
172 __PMC_EV(P6, FLOPS)				\
173 __PMC_EV(P6, FP_COMPS_OPS_EXE)			\
174 __PMC_EV(P6, FP_ASSIST)				\
175 __PMC_EV(P6, MUL)				\
176 __PMC_EV(P6, DIV)				\
177 __PMC_EV(P6, CYCLES_DIV_BUSY)			\
178 __PMC_EV(P6, LD_BLOCKS)				\
179 __PMC_EV(P6, SB_DRAINS)				\
180 __PMC_EV(P6, MISALIGN_MEM_REF)			\
181 __PMC_EV(P6, EMON_KNI_PREF_DISPATCHED)		\
182 __PMC_EV(P6, EMON_KNI_PREF_MISS)		\
183 __PMC_EV(P6, INST_RETIRED)			\
184 __PMC_EV(P6, UOPS_RETIRED)			\
185 __PMC_EV(P6, INST_DECODED)			\
186 __PMC_EV(P6, EMON_KNI_INST_RETIRED)		\
187 __PMC_EV(P6, EMON_KNI_COMP_INST_RET)		\
188 __PMC_EV(P6, HW_INT_RX)				\
189 __PMC_EV(P6, CYCLES_INT_MASKED)			\
190 __PMC_EV(P6, CYCLES_INT_PENDING_AND_MASKED)	\
191 __PMC_EV(P6, BR_INST_RETIRED)			\
192 __PMC_EV(P6, BR_MISS_PRED_RETIRED)		\
193 __PMC_EV(P6, BR_TAKEN_RETIRED)			\
194 __PMC_EV(P6, BR_MISS_PRED_TAKEN_RET)		\
195 __PMC_EV(P6, BR_INST_DECODED)			\
196 __PMC_EV(P6, BTB_MISSES)			\
197 __PMC_EV(P6, BR_BOGUS)				\
198 __PMC_EV(P6, BACLEARS)				\
199 __PMC_EV(P6, RESOURCE_STALLS)			\
200 __PMC_EV(P6, PARTIAL_RAT_STALLS)		\
201 __PMC_EV(P6, SEGMENT_REG_LOADS)			\
202 __PMC_EV(P6, CPU_CLK_UNHALTED)			\
203 __PMC_EV(P6, MMX_INSTR_EXEC)			\
204 __PMC_EV(P6, MMX_SAT_INSTR_EXEC)		\
205 __PMC_EV(P6, MMX_UOPS_EXEC)			\
206 __PMC_EV(P6, MMX_INSTR_TYPE_EXEC)		\
207 __PMC_EV(P6, FP_MMX_TRANS)			\
208 __PMC_EV(P6, MMX_ASSIST)			\
209 __PMC_EV(P6, MMX_INSTR_RET)			\
210 __PMC_EV(P6, SEG_RENAME_STALLS)			\
211 __PMC_EV(P6, SEG_REG_RENAMES)			\
212 __PMC_EV(P6, RET_SEG_RENAMES)			\
213 __PMC_EV(P6, EMON_EST_TRANS)			\
214 __PMC_EV(P6, EMON_THERMAL_TRIP)			\
215 __PMC_EV(P6, BR_INST_EXEC)			\
216 __PMC_EV(P6, BR_MISSP_EXEC)			\
217 __PMC_EV(P6, BR_BAC_MISSP_EXEC)			\
218 __PMC_EV(P6, BR_CND_EXEC)			\
219 __PMC_EV(P6, BR_CND_MISSP_EXEC)			\
220 __PMC_EV(P6, BR_IND_EXEC)			\
221 __PMC_EV(P6, BR_IND_MISSP_EXEC)			\
222 __PMC_EV(P6, BR_RET_EXEC)			\
223 __PMC_EV(P6, BR_RET_MISSP_EXEC)			\
224 __PMC_EV(P6, BR_RET_BAC_MISSP_EXEC)		\
225 __PMC_EV(P6, BR_CALL_EXEC)			\
226 __PMC_EV(P6, BR_CALL_MISSP_EXEC)		\
227 __PMC_EV(P6, BR_IND_CALL_EXEC)			\
228 __PMC_EV(P6, EMON_SIMD_INSTR_RETIRED)		\
229 __PMC_EV(P6, EMON_SYNCH_UOPS)			\
230 __PMC_EV(P6, EMON_ESP_UOPS)			\
231 __PMC_EV(P6, EMON_FUSED_UOPS_RET)		\
232 __PMC_EV(P6, EMON_UNFUSION)			\
233 __PMC_EV(P6, EMON_PREF_RQSTS_UP)		\
234 __PMC_EV(P6, EMON_PREF_RQSTS_DN)		\
235 __PMC_EV(P6, EMON_SSE_SSE2_INST_RETIRED)	\
236 __PMC_EV(P6, EMON_SSE_SSE2_COMP_INST_RETIRED)
237 
238 
239 #define	PMC_EV_P6_FIRST	PMC_EV_P6_DATA_MEM_REFS
240 #define	PMC_EV_P6_LAST	PMC_EV_P6_EMON_SSE_SSE2_COMP_INST_RETIRED
241 
242 /* AMD K8 PMCs */
243 
244 #define	__PMC_EV_K8()							\
245 __PMC_EV(K8, FP_DISPATCHED_FPU_OPS)					\
246 __PMC_EV(K8, FP_CYCLES_WITH_NO_FPU_OPS_RETIRED)				\
247 __PMC_EV(K8, FP_DISPATCHED_FPU_FAST_FLAG_OPS)				\
248 __PMC_EV(K8, LS_SEGMENT_REGISTER_LOAD)					\
249 __PMC_EV(K8, LS_MICROARCHITECTURAL_RESYNC_BY_SELF_MODIFYING_CODE)	\
250 __PMC_EV(K8, LS_MICROARCHITECTURAL_RESYNC_BY_SNOOP)			\
251 __PMC_EV(K8, LS_BUFFER2_FULL)						\
252 __PMC_EV(K8, LS_LOCKED_OPERATION)					\
253 __PMC_EV(K8, LS_MICROARCHITECTURAL_LATE_CANCEL)				\
254 __PMC_EV(K8, LS_RETIRED_CFLUSH_INSTRUCTIONS)				\
255 __PMC_EV(K8, LS_RETIRED_CPUID_INSTRUCTIONS)				\
256 __PMC_EV(K8, DC_ACCESS)							\
257 __PMC_EV(K8, DC_MISS)							\
258 __PMC_EV(K8, DC_REFILL_FROM_L2)						\
259 __PMC_EV(K8, DC_REFILL_FROM_SYSTEM)					\
260 __PMC_EV(K8, DC_COPYBACK)						\
261 __PMC_EV(K8, DC_L1_DTLB_MISS_AND_L2_DTLB_HIT)				\
262 __PMC_EV(K8, DC_L1_DTLB_MISS_AND_L2_DTLB_MISS)				\
263 __PMC_EV(K8, DC_MISALIGNED_DATA_REFERENCE)				\
264 __PMC_EV(K8, DC_MICROARCHITECTURAL_LATE_CANCEL)				\
265 __PMC_EV(K8, DC_MICROARCHITECTURAL_EARLY_CANCEL)			\
266 __PMC_EV(K8, DC_ONE_BIT_ECC_ERROR)					\
267 __PMC_EV(K8, DC_DISPATCHED_PREFETCH_INSTRUCTIONS)			\
268 __PMC_EV(K8, DC_DCACHE_ACCESSES_BY_LOCKS)				\
269 __PMC_EV(K8, BU_CPU_CLK_UNHALTED)					\
270 __PMC_EV(K8, BU_INTERNAL_L2_REQUEST)					\
271 __PMC_EV(K8, BU_FILL_REQUEST_L2_MISS)					\
272 __PMC_EV(K8, BU_FILL_INTO_L2)						\
273 __PMC_EV(K8, IC_FETCH)							\
274 __PMC_EV(K8, IC_MISS)							\
275 __PMC_EV(K8, IC_REFILL_FROM_L2)						\
276 __PMC_EV(K8, IC_REFILL_FROM_SYSTEM)					\
277 __PMC_EV(K8, IC_L1_ITLB_MISS_AND_L2_ITLB_HIT)				\
278 __PMC_EV(K8, IC_L1_ITLB_MISS_AND_L2_ITLB_MISS)				\
279 __PMC_EV(K8, IC_MICROARCHITECTURAL_RESYNC_BY_SNOOP)			\
280 __PMC_EV(K8, IC_INSTRUCTION_FETCH_STALL)				\
281 __PMC_EV(K8, IC_RETURN_STACK_HIT)					\
282 __PMC_EV(K8, IC_RETURN_STACK_OVERFLOW)					\
283 __PMC_EV(K8, FR_RETIRED_X86_INSTRUCTIONS)				\
284 __PMC_EV(K8, FR_RETIRED_UOPS)						\
285 __PMC_EV(K8, FR_RETIRED_BRANCHES)					\
286 __PMC_EV(K8, FR_RETIRED_BRANCHES_MISPREDICTED)				\
287 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES)					\
288 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED)			\
289 __PMC_EV(K8, FR_RETIRED_FAR_CONTROL_TRANSFERS)				\
290 __PMC_EV(K8, FR_RETIRED_RESYNCS)					\
291 __PMC_EV(K8, FR_RETIRED_NEAR_RETURNS)					\
292 __PMC_EV(K8, FR_RETIRED_NEAR_RETURNS_MISPREDICTED)			\
293 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED_BY_ADDR_MISCOMPARE)	\
294 __PMC_EV(K8, FR_RETIRED_FPU_INSTRUCTIONS)				\
295 __PMC_EV(K8, FR_RETIRED_FASTPATH_DOUBLE_OP_INSTRUCTIONS)		\
296 __PMC_EV(K8, FR_INTERRUPTS_MASKED_CYCLES)				\
297 __PMC_EV(K8, FR_INTERRUPTS_MASKED_WHILE_PENDING_CYCLES)			\
298 __PMC_EV(K8, FR_TAKEN_HARDWARE_INTERRUPTS)				\
299 __PMC_EV(K8, FR_DECODER_EMPTY)						\
300 __PMC_EV(K8, FR_DISPATCH_STALLS)					\
301 __PMC_EV(K8, FR_DISPATCH_STALL_FROM_BRANCH_ABORT_TO_RETIRE)		\
302 __PMC_EV(K8, FR_DISPATCH_STALL_FOR_SERIALIZATION)			\
303 __PMC_EV(K8, FR_DISPATCH_STALL_FOR_SEGMENT_LOAD)			\
304 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_REORDER_BUFFER_IS_FULL)		\
305 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_RESERVATION_STATIONS_ARE_FULL)	\
306 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_FPU_IS_FULL)			\
307 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_LS_IS_FULL)				\
308 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_WAITING_FOR_ALL_TO_BE_QUIET)	\
309 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_FAR_XFER_OR_RESYNC_BRANCH_PENDING)	\
310 __PMC_EV(K8, FR_FPU_EXCEPTIONS)						\
311 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR0)				\
312 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR1)				\
313 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR2)				\
314 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR3)				\
315 __PMC_EV(K8, NB_MEMORY_CONTROLLER_PAGE_ACCESS_EVENT)			\
316 __PMC_EV(K8, NB_MEMORY_CONTROLLER_PAGE_TABLE_OVERFLOW)			\
317 __PMC_EV(K8, NB_MEMORY_CONTROLLER_DRAM_COMMAND_SLOTS_MISSED)		\
318 __PMC_EV(K8, NB_MEMORY_CONTROLLER_TURNAROUND)				\
319 __PMC_EV(K8, NB_MEMORY_CONTROLLER_BYPASS_SATURATION)			\
320 __PMC_EV(K8, NB_SIZED_COMMANDS)						\
321 __PMC_EV(K8, NB_PROBE_RESULT)						\
322 __PMC_EV(K8, NB_HT_BUS0_BANDWIDTH)					\
323 __PMC_EV(K8, NB_HT_BUS1_BANDWIDTH)					\
324 __PMC_EV(K8, NB_HT_BUS2_BANDWIDTH)
325 
326 #define	PMC_EV_K8_FIRST		PMC_EV_K8_FP_DISPATCHED_FPU_OPS
327 #define	PMC_EV_K8_LAST		PMC_EV_K8_NB_HT_BUS2_BANDWIDTH
328 
329 
330 /*
331  * Intel Pentium and Pentium MMX events, from the "Intel 64 and IA-32
332  * Architectures Software Developer's Manual, Volume 3B: System Programming
333  * Guide, Part 2, August 2007".
334  */
335 #define	__PMC_EV_P5()							\
336 __PMC_EV(P5, DATA_READ)							\
337 __PMC_EV(P5, DATA_WRITE)						\
338 __PMC_EV(P5, DATA_TLB_MISS)						\
339 __PMC_EV(P5, DATA_READ_MISS)						\
340 __PMC_EV(P5, DATA_WRITE_MISS)						\
341 __PMC_EV(P5, WRITE_HIT_TO_M_OR_E_STATE_LINES)				\
342 __PMC_EV(P5, DATA_CACHE_LINES_WRITTEN_BACK)				\
343 __PMC_EV(P5, EXTERNAL_SNOOPS)						\
344 __PMC_EV(P5, EXTERNAL_DATA_CACHE_SNOOP_HITS)				\
345 __PMC_EV(P5, MEMORY_ACCESSES_IN_BOTH_PIPES)				\
346 __PMC_EV(P5, BANK_CONFLICTS)						\
347 __PMC_EV(P5, MISALIGNED_DATA_OR_IO_REFERENCES)				\
348 __PMC_EV(P5, CODE_READ)							\
349 __PMC_EV(P5, CODE_TLB_MISS)						\
350 __PMC_EV(P5, CODE_CACHE_MISS)						\
351 __PMC_EV(P5, ANY_SEGMENT_REGISTER_LOADED)				\
352 __PMC_EV(P5, BRANCHES)							\
353 __PMC_EV(P5, BTB_HITS)							\
354 __PMC_EV(P5, TAKEN_BRANCH_OR_BTB_HIT)					\
355 __PMC_EV(P5, PIPELINE_FLUSHES)						\
356 __PMC_EV(P5, INSTRUCTIONS_EXECUTED)					\
357 __PMC_EV(P5, INSTRUCTIONS_EXECUTED_V_PIPE)				\
358 __PMC_EV(P5, BUS_CYCLE_DURATION)					\
359 __PMC_EV(P5, WRITE_BUFFER_FULL_STALL_DURATION)				\
360 __PMC_EV(P5, WAITING_FOR_DATA_MEMORY_READ_STALL_DURATION)		\
361 __PMC_EV(P5, STALL_ON_WRITE_TO_AN_E_OR_M_STATE_LINE)			\
362 __PMC_EV(P5, LOCKED_BUS_CYCLE)						\
363 __PMC_EV(P5, IO_READ_OR_WRITE_CYCLE)					\
364 __PMC_EV(P5, NONCACHEABLE_MEMORY_READS)					\
365 __PMC_EV(P5, PIPELINE_AGI_STALLS)					\
366 __PMC_EV(P5, FLOPS)							\
367 __PMC_EV(P5, BREAKPOINT_MATCH_ON_DR0_REGISTER)				\
368 __PMC_EV(P5, BREAKPOINT_MATCH_ON_DR1_REGISTER)				\
369 __PMC_EV(P5, BREAKPOINT_MATCH_ON_DR2_REGISTER)				\
370 __PMC_EV(P5, BREAKPOINT_MATCH_ON_DR3_REGISTER)				\
371 __PMC_EV(P5, HARDWARE_INTERRUPTS)					\
372 __PMC_EV(P5, DATA_READ_OR_WRITE)					\
373 __PMC_EV(P5, DATA_READ_MISS_OR_WRITE_MISS)				\
374 __PMC_EV(P5, BUS_OWNERSHIP_LATENCY)					\
375 __PMC_EV(P5, BUS_OWNERSHIP_TRANSFERS)					\
376 __PMC_EV(P5, MMX_INSTRUCTIONS_EXECUTED_U_PIPE)				\
377 __PMC_EV(P5, MMX_INSTRUCTIONS_EXECUTED_V_PIPE)				\
378 __PMC_EV(P5, CACHE_M_LINE_SHARING)					\
379 __PMC_EV(P5, CACHE_LINE_SHARING)					\
380 __PMC_EV(P5, EMMS_INSTRUCTIONS_EXECUTED)				\
381 __PMC_EV(P5, TRANSITIONS_BETWEEN_MMX_AND_FP_INSTRUCTIONS)		\
382 __PMC_EV(P5, BUS_UTILIZATION_DUE_TO_PROCESSOR_ACTIVITY)			\
383 __PMC_EV(P5, WRITES_TO_NONCACHEABLE_MEMORY)				\
384 __PMC_EV(P5, SATURATING_MMX_INSTRUCTIONS_EXECUTED)			\
385 __PMC_EV(P5, SATURATIONS_PERFORMED)					\
386 __PMC_EV(P5, NUMBER_OF_CYCLES_NOT_IN_HALT_STATE)			\
387 __PMC_EV(P5, DATA_CACHE_TLB_MISS_STALL_DURATION)			\
388 __PMC_EV(P5, MMX_INSTRUCTION_DATA_READS)				\
389 __PMC_EV(P5, MMX_INSTRUCTION_DATA_READ_MISSES)				\
390 __PMC_EV(P5, FLOATING_POINT_STALLS_DURATION)				\
391 __PMC_EV(P5, TAKEN_BRANCHES)						\
392 __PMC_EV(P5, D1_STARVATION_AND_FIFO_IS_EMPTY)				\
393 __PMC_EV(P5, D1_STARVATION_AND_ONLY_ONE_INSTRUCTION_IN_FIFO)		\
394 __PMC_EV(P5, MMX_INSTRUCTION_DATA_WRITES)				\
395 __PMC_EV(P5, MMX_INSTRUCTION_DATA_WRITE_MISSES)				\
396 __PMC_EV(P5, PIPELINE_FLUSHES_DUE_TO_WRONG_BRANCH_PREDICTIONS)		\
397 __PMC_EV(P5,								\
398     PIPELINE_FLUSHES_DUE_TO_WRONG_BRANCH_PREDICTIONS_RESOLVED_IN_WB_STAGE) \
399 __PMC_EV(P5, MISALIGNED_DATA_MEMORY_REFERENCE_ON_MMX_INSTRUCTIONS)	\
400 __PMC_EV(P5, PIPELINE_STALL_FOR_MMX_INSTRUCTION_DATA_MEMORY_READS)	\
401 __PMC_EV(P5, MISPREDICTED_OR_UNPREDICTED_RETURNS)			\
402 __PMC_EV(P5, PREDICTED_RETURNS)						\
403 __PMC_EV(P5, MMX_MULTIPLY_UNIT_INTERLOCK)				\
404 __PMC_EV(P5, MOVD_MOVQ_STORE_STALL_DUE_TO_PREVIOUS_MMX_OPERATION)	\
405 __PMC_EV(P5, RETURNS)							\
406 __PMC_EV(P5, BTB_FALSE_ENTRIES)						\
407 __PMC_EV(P5, BTB_MISS_PREDICTION_ON_NOT_TAKEN_BRANCH)			\
408 __PMC_EV(P5,								\
409     FULL_WRITE_BUFFER_STALL_DURATION_WHILE_EXECUTING_MMX_INSTRUCTIONS)	\
410 __PMC_EV(P5, STALL_ON_MMX_INSTRUCTION_WRITE_TO_E_OR_M_STATE_LINE)
411 
412 #define	PMC_EV_P5_FIRST		PMC_EV_P5_DATA_READ
413 #define	PMC_EV_P5_LAST	        \
414 	PMC_EV_P5_STALL_ON_MMX_INSTRUCTION_WRITE_TO_E_OR_M_STATE_LINE
415 
416 /*
417  * Events supported by Intel architectural fixed function counters,
418  * from the "Intel 64 and IA-32 Architectures Software Developer's
419  * Manual Volume 3B: System Programming Guide, Part 2", July 2008.
420  */
421 #define	__PMC_EV_IAF()							\
422 __PMC_EV(IAF, INSTR_RETIRED_ANY)					\
423 __PMC_EV(IAF, CPU_CLK_UNHALTED_CORE)					\
424 __PMC_EV(IAF, CPU_CLK_UNHALTED_REF)
425 
426 #define	PMC_EV_IAF_FIRST	PMC_EV_IAF_INSTR_RETIRED_ANY
427 #define	PMC_EV_IAF_LAST		PMC_EV_IAF_CPU_CLK_UNHALTED_REF
428 
429 #define	__PMC_EV_ALIAS_IAF()						\
430 __PMC_EV_ALIAS("instruction-retired",	IAF_INSTR_RETIRED_ANY)		\
431 __PMC_EV_ALIAS("unhalted-core-cycles",	IAF_CPU_CLK_UNHALTED_CORE)	\
432 __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF)
433 
434 /*
435  * Events supported by programmable function counters present in
436  * Intel Atom, Core and Core2 CPUs, from the "Intel 64 and IA-32
437  * Architectures Software Developer's Manual Volume 3B: System Programming
438  * Guide, Part 2", July 2008.
439  *
440  * These PMCs select events with a combination of an event code and
441  * unit mask.  Quirks that need to be taken care of include:
442  * - The set of (event code, umask) combinations supported by a processor
443  *   varies according to the processor model.
444  * - A given (event code, umask) combination need not measure the same
445  *   hardware event in all processor models.
446  * - Event names in vendor documentation for an (event code, umask) pair
447  *   may vary according to the CPU model.
448  * - Identically named events can map to different (event code, umask)
449  *   pairs on different CPUs.
450  * - New (event code, umask) combinations continue to be added as CPUs
451  *   evolve.  The interface between hwpmc(4) and libpmc(3) needs to be
452  *   robust with respect to ABI changes.
453  *
454  * The IAP_EVENT_* symbols below define the ABI between userland and kernel.
455  * New (event code, * umask) combinations used in new CPUs would be added
456  * to the end of the list.  Vendor names for events are mapped to IAP_EVENT_*
457  * symbols using aliases.  The final disambiguation of semantics based on
458  * the CPU model happens inside hwpmc(4).
459  */
460 #define	__PMC_EV_IAP()				\
461 __PMC_EV(IAP, EVENT_02H_81H)			\
462 __PMC_EV(IAP, EVENT_03H_00H)			\
463 __PMC_EV(IAP, EVENT_03H_02H)			\
464 __PMC_EV(IAP, EVENT_03H_04H)			\
465 __PMC_EV(IAP, EVENT_03H_08H)			\
466 __PMC_EV(IAP, EVENT_03H_10H)			\
467 __PMC_EV(IAP, EVENT_03H_20H)			\
468 __PMC_EV(IAP, EVENT_04H_00H)			\
469 __PMC_EV(IAP, EVENT_04H_01H)			\
470 __PMC_EV(IAP, EVENT_04H_02H)			\
471 __PMC_EV(IAP, EVENT_04H_08H)			\
472 __PMC_EV(IAP, EVENT_05H_00H)			\
473 __PMC_EV(IAP, EVENT_06H_00H)			\
474 __PMC_EV(IAP, EVENT_07H_00H)			\
475 __PMC_EV(IAP, EVENT_07H_01H)			\
476 __PMC_EV(IAP, EVENT_07H_02H)			\
477 __PMC_EV(IAP, EVENT_07H_03H)			\
478 __PMC_EV(IAP, EVENT_07H_06H)			\
479 __PMC_EV(IAP, EVENT_07H_08H)			\
480 __PMC_EV(IAP, EVENT_08H_01H)			\
481 __PMC_EV(IAP, EVENT_08H_02H)			\
482 __PMC_EV(IAP, EVENT_08H_04H)			\
483 __PMC_EV(IAP, EVENT_08H_05H)			\
484 __PMC_EV(IAP, EVENT_08H_06H)			\
485 __PMC_EV(IAP, EVENT_08H_07H)			\
486 __PMC_EV(IAP, EVENT_08H_08H)			\
487 __PMC_EV(IAP, EVENT_08H_09H)			\
488 __PMC_EV(IAP, EVENT_09H_01H)			\
489 __PMC_EV(IAP, EVENT_09H_02H)			\
490 __PMC_EV(IAP, EVENT_0CH_01H)			\
491 __PMC_EV(IAP, EVENT_0CH_02H)			\
492 __PMC_EV(IAP, EVENT_0CH_03H)			\
493 __PMC_EV(IAP, EVENT_10H_00H)			\
494 __PMC_EV(IAP, EVENT_10H_01H)			\
495 __PMC_EV(IAP, EVENT_10H_81H)			\
496 __PMC_EV(IAP, EVENT_11H_00H)			\
497 __PMC_EV(IAP, EVENT_11H_01H)			\
498 __PMC_EV(IAP, EVENT_11H_81H)			\
499 __PMC_EV(IAP, EVENT_12H_00H)			\
500 __PMC_EV(IAP, EVENT_12H_01H)			\
501 __PMC_EV(IAP, EVENT_12H_81H)			\
502 __PMC_EV(IAP, EVENT_13H_00H)			\
503 __PMC_EV(IAP, EVENT_13H_01H)			\
504 __PMC_EV(IAP, EVENT_13H_81H)			\
505 __PMC_EV(IAP, EVENT_14H_00H)			\
506 __PMC_EV(IAP, EVENT_14H_01H)			\
507 __PMC_EV(IAP, EVENT_18H_00H)			\
508 __PMC_EV(IAP, EVENT_19H_00H)			\
509 __PMC_EV(IAP, EVENT_19H_01H)			\
510 __PMC_EV(IAP, EVENT_19H_02H)			\
511 __PMC_EV(IAP, EVENT_21H)			\
512 __PMC_EV(IAP, EVENT_22H)			\
513 __PMC_EV(IAP, EVENT_23H)			\
514 __PMC_EV(IAP, EVENT_24H)			\
515 __PMC_EV(IAP, EVENT_25H)			\
516 __PMC_EV(IAP, EVENT_26H)			\
517 __PMC_EV(IAP, EVENT_27H)			\
518 __PMC_EV(IAP, EVENT_28H)			\
519 __PMC_EV(IAP, EVENT_29H)			\
520 __PMC_EV(IAP, EVENT_2AH)			\
521 __PMC_EV(IAP, EVENT_2BH)			\
522 __PMC_EV(IAP, EVENT_2EH)			\
523 __PMC_EV(IAP, EVENT_2EH_41H)			\
524 __PMC_EV(IAP, EVENT_2EH_4FH)			\
525 __PMC_EV(IAP, EVENT_30H)			\
526 __PMC_EV(IAP, EVENT_32H)			\
527 __PMC_EV(IAP, EVENT_3AH)			\
528 __PMC_EV(IAP, EVENT_3AH_00H)			\
529 __PMC_EV(IAP, EVENT_3BH_C0H)			\
530 __PMC_EV(IAP, EVENT_3CH_00H)			\
531 __PMC_EV(IAP, EVENT_3CH_01H)			\
532 __PMC_EV(IAP, EVENT_3CH_02H)			\
533 __PMC_EV(IAP, EVENT_40H)			\
534 __PMC_EV(IAP, EVENT_40H_21H)			\
535 __PMC_EV(IAP, EVENT_41H)			\
536 __PMC_EV(IAP, EVENT_41H_22H)			\
537 __PMC_EV(IAP, EVENT_42H)			\
538 __PMC_EV(IAP, EVENT_42H_10H)			\
539 __PMC_EV(IAP, EVENT_43H_01H)			\
540 __PMC_EV(IAP, EVENT_43H_02H)			\
541 __PMC_EV(IAP, EVENT_44H_02H)			\
542 __PMC_EV(IAP, EVENT_45H_0FH)			\
543 __PMC_EV(IAP, EVENT_46H_00H)			\
544 __PMC_EV(IAP, EVENT_47H_00H)			\
545 __PMC_EV(IAP, EVENT_48H_00H)			\
546 __PMC_EV(IAP, EVENT_49H_00H)			\
547 __PMC_EV(IAP, EVENT_49H_01H)			\
548 __PMC_EV(IAP, EVENT_49H_02H)			\
549 __PMC_EV(IAP, EVENT_4BH_00H)			\
550 __PMC_EV(IAP, EVENT_4BH_01H)			\
551 __PMC_EV(IAP, EVENT_4BH_02H)			\
552 __PMC_EV(IAP, EVENT_4BH_03H)			\
553 __PMC_EV(IAP, EVENT_4CH_00H)			\
554 __PMC_EV(IAP, EVENT_4EH_10H)			\
555 __PMC_EV(IAP, EVENT_4FH_00H)			\
556 __PMC_EV(IAP, EVENT_60H)			\
557 __PMC_EV(IAP, EVENT_61H)			\
558 __PMC_EV(IAP, EVENT_61H_00H)			\
559 __PMC_EV(IAP, EVENT_62H)			\
560 __PMC_EV(IAP, EVENT_62H_00H)			\
561 __PMC_EV(IAP, EVENT_63H)			\
562 __PMC_EV(IAP, EVENT_64H)			\
563 __PMC_EV(IAP, EVENT_64H_40H)			\
564 __PMC_EV(IAP, EVENT_65H)			\
565 __PMC_EV(IAP, EVENT_66H)			\
566 __PMC_EV(IAP, EVENT_67H)			\
567 __PMC_EV(IAP, EVENT_68H)			\
568 __PMC_EV(IAP, EVENT_69H)			\
569 __PMC_EV(IAP, EVENT_6AH)			\
570 __PMC_EV(IAP, EVENT_6BH)			\
571 __PMC_EV(IAP, EVENT_6CH)			\
572 __PMC_EV(IAP, EVENT_6DH)			\
573 __PMC_EV(IAP, EVENT_6EH)			\
574 __PMC_EV(IAP, EVENT_6FH)			\
575 __PMC_EV(IAP, EVENT_70H)			\
576 __PMC_EV(IAP, EVENT_77H)			\
577 __PMC_EV(IAP, EVENT_78H)			\
578 __PMC_EV(IAP, EVENT_7AH)			\
579 __PMC_EV(IAP, EVENT_7BH)			\
580 __PMC_EV(IAP, EVENT_7DH)			\
581 __PMC_EV(IAP, EVENT_7EH)			\
582 __PMC_EV(IAP, EVENT_7EH_00H)			\
583 __PMC_EV(IAP, EVENT_7FH)			\
584 __PMC_EV(IAP, EVENT_80H_00H)			\
585 __PMC_EV(IAP, EVENT_80H_02H)			\
586 __PMC_EV(IAP, EVENT_80H_03H)			\
587 __PMC_EV(IAP, EVENT_81H_00H)			\
588 __PMC_EV(IAP, EVENT_82H_02H)			\
589 __PMC_EV(IAP, EVENT_82H_04H)			\
590 __PMC_EV(IAP, EVENT_82H_10H)			\
591 __PMC_EV(IAP, EVENT_82H_12H)			\
592 __PMC_EV(IAP, EVENT_82H_40H)			\
593 __PMC_EV(IAP, EVENT_83H_02H)			\
594 __PMC_EV(IAP, EVENT_85H_00H)			\
595 __PMC_EV(IAP, EVENT_86H_00H)			\
596 __PMC_EV(IAP, EVENT_87H_00H)			\
597 __PMC_EV(IAP, EVENT_88H_00H)			\
598 __PMC_EV(IAP, EVENT_89H_00H)			\
599 __PMC_EV(IAP, EVENT_8AH_00H)			\
600 __PMC_EV(IAP, EVENT_8BH_00H)			\
601 __PMC_EV(IAP, EVENT_8CH_00H)			\
602 __PMC_EV(IAP, EVENT_8DH_00H)			\
603 __PMC_EV(IAP, EVENT_8EH_00H)			\
604 __PMC_EV(IAP, EVENT_8FH_00H)			\
605 __PMC_EV(IAP, EVENT_90H_00H)			\
606 __PMC_EV(IAP, EVENT_91H_00H)			\
607 __PMC_EV(IAP, EVENT_92H_00H)			\
608 __PMC_EV(IAP, EVENT_93H_00H)			\
609 __PMC_EV(IAP, EVENT_94H_00H)			\
610 __PMC_EV(IAP, EVENT_97H_00H)			\
611 __PMC_EV(IAP, EVENT_98H_00H)			\
612 __PMC_EV(IAP, EVENT_A0H_00H)			\
613 __PMC_EV(IAP, EVENT_A1H_01H)			\
614 __PMC_EV(IAP, EVENT_A1H_02H)			\
615 __PMC_EV(IAP, EVENT_A1H_04H)			\
616 __PMC_EV(IAP, EVENT_A1H_08H)			\
617 __PMC_EV(IAP, EVENT_A1H_10H)			\
618 __PMC_EV(IAP, EVENT_A1H_20H)			\
619 __PMC_EV(IAP, EVENT_A2H_00H)			\
620 __PMC_EV(IAP, EVENT_AAH_01H)			\
621 __PMC_EV(IAP, EVENT_AAH_02H)			\
622 __PMC_EV(IAP, EVENT_AAH_03H)			\
623 __PMC_EV(IAP, EVENT_AAH_08H)			\
624 __PMC_EV(IAP, EVENT_ABH_01H)			\
625 __PMC_EV(IAP, EVENT_ABH_02H)			\
626 __PMC_EV(IAP, EVENT_B0H_00H)			\
627 __PMC_EV(IAP, EVENT_B0H_80H)			\
628 __PMC_EV(IAP, EVENT_B1H_00H)			\
629 __PMC_EV(IAP, EVENT_B1H_80H)			\
630 __PMC_EV(IAP, EVENT_B3H_01H)			\
631 __PMC_EV(IAP, EVENT_B3H_02H)			\
632 __PMC_EV(IAP, EVENT_B3H_04H)			\
633 __PMC_EV(IAP, EVENT_B3H_08H)			\
634 __PMC_EV(IAP, EVENT_B3H_10H)			\
635 __PMC_EV(IAP, EVENT_B3H_20H)			\
636 __PMC_EV(IAP, EVENT_B3H_81H)			\
637 __PMC_EV(IAP, EVENT_B3H_82H)			\
638 __PMC_EV(IAP, EVENT_B3H_84H)			\
639 __PMC_EV(IAP, EVENT_B3H_88H)			\
640 __PMC_EV(IAP, EVENT_B3H_90H)			\
641 __PMC_EV(IAP, EVENT_B3H_A0H)			\
642 __PMC_EV(IAP, EVENT_C0H_00H)			\
643 __PMC_EV(IAP, EVENT_C0H_01H)			\
644 __PMC_EV(IAP, EVENT_C0H_02H)			\
645 __PMC_EV(IAP, EVENT_C0H_04H)			\
646 __PMC_EV(IAP, EVENT_C0H_08H)			\
647 __PMC_EV(IAP, EVENT_C1H_00H)			\
648 __PMC_EV(IAP, EVENT_C1H_01H)			\
649 __PMC_EV(IAP, EVENT_C1H_FEH)			\
650 __PMC_EV(IAP, EVENT_C2H_00H)			\
651 __PMC_EV(IAP, EVENT_C2H_01H)			\
652 __PMC_EV(IAP, EVENT_C2H_02H)			\
653 __PMC_EV(IAP, EVENT_C2H_04H)			\
654 __PMC_EV(IAP, EVENT_C2H_07H)			\
655 __PMC_EV(IAP, EVENT_C2H_0FH)			\
656 __PMC_EV(IAP, EVENT_C2H_10H)			\
657 __PMC_EV(IAP, EVENT_C2H_08H)			\
658 __PMC_EV(IAP, EVENT_C3H_00H)			\
659 __PMC_EV(IAP, EVENT_C3H_01H)			\
660 __PMC_EV(IAP, EVENT_C3H_04H)			\
661 __PMC_EV(IAP, EVENT_C4H_00H)			\
662 __PMC_EV(IAP, EVENT_C4H_01H)			\
663 __PMC_EV(IAP, EVENT_C4H_02H)			\
664 __PMC_EV(IAP, EVENT_C4H_04H)			\
665 __PMC_EV(IAP, EVENT_C4H_08H)			\
666 __PMC_EV(IAP, EVENT_C4H_0CH)			\
667 __PMC_EV(IAP, EVENT_C4H_0FH)			\
668 __PMC_EV(IAP, EVENT_C5H_00H)			\
669 __PMC_EV(IAP, EVENT_C6H_00H)			\
670 __PMC_EV(IAP, EVENT_C6H_01H)			\
671 __PMC_EV(IAP, EVENT_C6H_02H)			\
672 __PMC_EV(IAP, EVENT_C7H_00H)			\
673 __PMC_EV(IAP, EVENT_C7H_01H)			\
674 __PMC_EV(IAP, EVENT_C7H_02H)			\
675 __PMC_EV(IAP, EVENT_C7H_04H)			\
676 __PMC_EV(IAP, EVENT_C7H_08H)			\
677 __PMC_EV(IAP, EVENT_C7H_10H)			\
678 __PMC_EV(IAP, EVENT_C7H_1FH)			\
679 __PMC_EV(IAP, EVENT_C8H_00H)			\
680 __PMC_EV(IAP, EVENT_C9H_00H)			\
681 __PMC_EV(IAP, EVENT_CAH_00H)			\
682 __PMC_EV(IAP, EVENT_CAH_01H)			\
683 __PMC_EV(IAP, EVENT_CAH_02H)			\
684 __PMC_EV(IAP, EVENT_CAH_04H)			\
685 __PMC_EV(IAP, EVENT_CAH_08H)			\
686 __PMC_EV(IAP, EVENT_CBH_01H)			\
687 __PMC_EV(IAP, EVENT_CBH_02H)			\
688 __PMC_EV(IAP, EVENT_CBH_04H)			\
689 __PMC_EV(IAP, EVENT_CBH_08H)			\
690 __PMC_EV(IAP, EVENT_CBH_10H)			\
691 __PMC_EV(IAP, EVENT_CCH_00H)			\
692 __PMC_EV(IAP, EVENT_CCH_01H)			\
693 __PMC_EV(IAP, EVENT_CCH_02H)			\
694 __PMC_EV(IAP, EVENT_CDH_00H)			\
695 __PMC_EV(IAP, EVENT_CEH_00H)			\
696 __PMC_EV(IAP, EVENT_CFH_00H)			\
697 __PMC_EV(IAP, EVENT_D0H_00H)			\
698 __PMC_EV(IAP, EVENT_D2H_01H)			\
699 __PMC_EV(IAP, EVENT_D2H_02H)			\
700 __PMC_EV(IAP, EVENT_D2H_04H)			\
701 __PMC_EV(IAP, EVENT_D2H_08H)			\
702 __PMC_EV(IAP, EVENT_D2H_0FH)			\
703 __PMC_EV(IAP, EVENT_D2H_10H)			\
704 __PMC_EV(IAP, EVENT_D4H_01H)			\
705 __PMC_EV(IAP, EVENT_D4H_02H)			\
706 __PMC_EV(IAP, EVENT_D4H_04H)			\
707 __PMC_EV(IAP, EVENT_D4H_08H)			\
708 __PMC_EV(IAP, EVENT_D4H_0FH)			\
709 __PMC_EV(IAP, EVENT_D5H_01H)			\
710 __PMC_EV(IAP, EVENT_D5H_02H)			\
711 __PMC_EV(IAP, EVENT_D5H_04H)			\
712 __PMC_EV(IAP, EVENT_D5H_08H)			\
713 __PMC_EV(IAP, EVENT_D5H_0FH)			\
714 __PMC_EV(IAP, EVENT_D7H_00H)			\
715 __PMC_EV(IAP, EVENT_D8H_00H)			\
716 __PMC_EV(IAP, EVENT_D8H_01H)			\
717 __PMC_EV(IAP, EVENT_D8H_02H)			\
718 __PMC_EV(IAP, EVENT_D8H_03H)			\
719 __PMC_EV(IAP, EVENT_D8H_04H)			\
720 __PMC_EV(IAP, EVENT_D9H_00H)			\
721 __PMC_EV(IAP, EVENT_D9H_01H)			\
722 __PMC_EV(IAP, EVENT_D9H_02H)			\
723 __PMC_EV(IAP, EVENT_D9H_03H)			\
724 __PMC_EV(IAP, EVENT_DAH_00H)			\
725 __PMC_EV(IAP, EVENT_DAH_01H)			\
726 __PMC_EV(IAP, EVENT_DAH_02H)			\
727 __PMC_EV(IAP, EVENT_DBH_00H)			\
728 __PMC_EV(IAP, EVENT_DCH_01H)			\
729 __PMC_EV(IAP, EVENT_DCH_02H)			\
730 __PMC_EV(IAP, EVENT_DCH_04H)			\
731 __PMC_EV(IAP, EVENT_DCH_08H)			\
732 __PMC_EV(IAP, EVENT_DCH_10H)			\
733 __PMC_EV(IAP, EVENT_DCH_1FH)			\
734 __PMC_EV(IAP, EVENT_E0H_00H)			\
735 __PMC_EV(IAP, EVENT_E0H_01H)			\
736 __PMC_EV(IAP, EVENT_E2H_00H)			\
737 __PMC_EV(IAP, EVENT_E4H_00H)			\
738 __PMC_EV(IAP, EVENT_E6H_00H)			\
739 __PMC_EV(IAP, EVENT_E6H_01H)			\
740 __PMC_EV(IAP, EVENT_F0H_00H)			\
741 __PMC_EV(IAP, EVENT_F8H_00H)			\
742 __PMC_EV(IAP, EVENT_02H_01H)			\
743 __PMC_EV(IAP, EVENT_03H_01H)			\
744 __PMC_EV(IAP, EVENT_05H_01H)			\
745 __PMC_EV(IAP, EVENT_05H_02H)			\
746 __PMC_EV(IAP, EVENT_05H_03H)			\
747 __PMC_EV(IAP, EVENT_06H_01H)			\
748 __PMC_EV(IAP, EVENT_06H_02H)			\
749 __PMC_EV(IAP, EVENT_06H_04H)			\
750 __PMC_EV(IAP, EVENT_06H_08H)			\
751 __PMC_EV(IAP, EVENT_06H_0FH)			\
752 __PMC_EV(IAP, EVENT_08H_10H)			\
753 __PMC_EV(IAP, EVENT_08H_20H)			\
754 __PMC_EV(IAP, EVENT_08H_40H)			\
755 __PMC_EV(IAP, EVENT_08H_80H)			\
756 __PMC_EV(IAP, EVENT_09H_04H)			\
757 __PMC_EV(IAP, EVENT_09H_08H)			\
758 __PMC_EV(IAP, EVENT_0BH_01H)			\
759 __PMC_EV(IAP, EVENT_0BH_02H)			\
760 __PMC_EV(IAP, EVENT_0EH_01H)			\
761 __PMC_EV(IAP, EVENT_0EH_02H)			\
762 __PMC_EV(IAP, EVENT_0FH_02H)			\
763 __PMC_EV(IAP, EVENT_0FH_08H)			\
764 __PMC_EV(IAP, EVENT_0FH_10H)			\
765 __PMC_EV(IAP, EVENT_0FH_20H)			\
766 __PMC_EV(IAP, EVENT_10H_02H)			\
767 __PMC_EV(IAP, EVENT_10H_04H)			\
768 __PMC_EV(IAP, EVENT_10H_08H)			\
769 __PMC_EV(IAP, EVENT_10H_10H)			\
770 __PMC_EV(IAP, EVENT_10H_20H)			\
771 __PMC_EV(IAP, EVENT_10H_40H)			\
772 __PMC_EV(IAP, EVENT_10H_80H)			\
773 __PMC_EV(IAP, EVENT_12H_02H)			\
774 __PMC_EV(IAP, EVENT_12H_04H)			\
775 __PMC_EV(IAP, EVENT_12H_08H)			\
776 __PMC_EV(IAP, EVENT_12H_10H)			\
777 __PMC_EV(IAP, EVENT_12H_20H)			\
778 __PMC_EV(IAP, EVENT_12H_40H)			\
779 __PMC_EV(IAP, EVENT_13H_02H)			\
780 __PMC_EV(IAP, EVENT_13H_04H)			\
781 __PMC_EV(IAP, EVENT_13H_07H)			\
782 __PMC_EV(IAP, EVENT_14H_02H)			\
783 __PMC_EV(IAP, EVENT_17H_01H)			\
784 __PMC_EV(IAP, EVENT_18H_01H)			\
785 __PMC_EV(IAP, EVENT_1DH_01H)			\
786 __PMC_EV(IAP, EVENT_1DH_02H)			\
787 __PMC_EV(IAP, EVENT_1DH_04H)			\
788 __PMC_EV(IAP, EVENT_1EH_01H)			\
789 __PMC_EV(IAP, EVENT_24H_01H)			\
790 __PMC_EV(IAP, EVENT_24H_02H)			\
791 __PMC_EV(IAP, EVENT_24H_03H)			\
792 __PMC_EV(IAP, EVENT_24H_04H)			\
793 __PMC_EV(IAP, EVENT_24H_08H)			\
794 __PMC_EV(IAP, EVENT_24H_0CH)			\
795 __PMC_EV(IAP, EVENT_24H_10H)			\
796 __PMC_EV(IAP, EVENT_24H_20H)			\
797 __PMC_EV(IAP, EVENT_24H_30H)			\
798 __PMC_EV(IAP, EVENT_24H_40H)			\
799 __PMC_EV(IAP, EVENT_24H_80H)			\
800 __PMC_EV(IAP, EVENT_24H_AAH)			\
801 __PMC_EV(IAP, EVENT_24H_C0H)			\
802 __PMC_EV(IAP, EVENT_24H_FFH)			\
803 __PMC_EV(IAP, EVENT_26H_01H)			\
804 __PMC_EV(IAP, EVENT_26H_02H)			\
805 __PMC_EV(IAP, EVENT_26H_04H)			\
806 __PMC_EV(IAP, EVENT_26H_08H)			\
807 __PMC_EV(IAP, EVENT_26H_0FH)			\
808 __PMC_EV(IAP, EVENT_26H_10H)			\
809 __PMC_EV(IAP, EVENT_26H_20H)			\
810 __PMC_EV(IAP, EVENT_26H_40H)			\
811 __PMC_EV(IAP, EVENT_26H_80H)			\
812 __PMC_EV(IAP, EVENT_26H_F0H)			\
813 __PMC_EV(IAP, EVENT_26H_FFH)			\
814 __PMC_EV(IAP, EVENT_27H_01H)			\
815 __PMC_EV(IAP, EVENT_27H_02H)			\
816 __PMC_EV(IAP, EVENT_27H_04H)			\
817 __PMC_EV(IAP, EVENT_27H_08H)			\
818 __PMC_EV(IAP, EVENT_27H_0EH)			\
819 __PMC_EV(IAP, EVENT_27H_0FH)			\
820 __PMC_EV(IAP, EVENT_27H_10H)			\
821 __PMC_EV(IAP, EVENT_27H_20H)			\
822 __PMC_EV(IAP, EVENT_27H_40H)			\
823 __PMC_EV(IAP, EVENT_27H_80H)			\
824 __PMC_EV(IAP, EVENT_27H_E0H)			\
825 __PMC_EV(IAP, EVENT_27H_F0H)			\
826 __PMC_EV(IAP, EVENT_28H_01H)			\
827 __PMC_EV(IAP, EVENT_28H_02H)			\
828 __PMC_EV(IAP, EVENT_28H_04H)			\
829 __PMC_EV(IAP, EVENT_28H_08H)			\
830 __PMC_EV(IAP, EVENT_28H_0FH)			\
831 __PMC_EV(IAP, EVENT_3DH_01H)			\
832 __PMC_EV(IAP, EVENT_40H_01H)			\
833 __PMC_EV(IAP, EVENT_40H_02H)			\
834 __PMC_EV(IAP, EVENT_40H_04H)			\
835 __PMC_EV(IAP, EVENT_40H_08H)			\
836 __PMC_EV(IAP, EVENT_40H_0FH)			\
837 __PMC_EV(IAP, EVENT_41H_01H)			\
838 __PMC_EV(IAP, EVENT_41H_02H)			\
839 __PMC_EV(IAP, EVENT_41H_04H)			\
840 __PMC_EV(IAP, EVENT_41H_08H)			\
841 __PMC_EV(IAP, EVENT_41H_0FH)			\
842 __PMC_EV(IAP, EVENT_42H_01H)			\
843 __PMC_EV(IAP, EVENT_42H_02H)			\
844 __PMC_EV(IAP, EVENT_42H_04H)			\
845 __PMC_EV(IAP, EVENT_42H_08H)			\
846 __PMC_EV(IAP, EVENT_48H_02H)			\
847 __PMC_EV(IAP, EVENT_49H_10H)			\
848 __PMC_EV(IAP, EVENT_49H_20H)			\
849 __PMC_EV(IAP, EVENT_49H_40H)			\
850 __PMC_EV(IAP, EVENT_49H_80H)			\
851 __PMC_EV(IAP, EVENT_4BH_08H)			\
852 __PMC_EV(IAP, EVENT_4CH_01H)			\
853 __PMC_EV(IAP, EVENT_4DH_01H)			\
854 __PMC_EV(IAP, EVENT_4EH_01H)			\
855 __PMC_EV(IAP, EVENT_4EH_02H)			\
856 __PMC_EV(IAP, EVENT_4EH_04H)			\
857 __PMC_EV(IAP, EVENT_4FH_02H)			\
858 __PMC_EV(IAP, EVENT_4FH_04H)			\
859 __PMC_EV(IAP, EVENT_4FH_08H)			\
860 __PMC_EV(IAP, EVENT_51H_01H)			\
861 __PMC_EV(IAP, EVENT_51H_02H)			\
862 __PMC_EV(IAP, EVENT_51H_04H)			\
863 __PMC_EV(IAP, EVENT_51H_08H)			\
864 __PMC_EV(IAP, EVENT_52H_01H)			\
865 __PMC_EV(IAP, EVENT_53H_01H)			\
866 __PMC_EV(IAP, EVENT_60H_01H)			\
867 __PMC_EV(IAP, EVENT_60H_02H)			\
868 __PMC_EV(IAP, EVENT_60H_04H)			\
869 __PMC_EV(IAP, EVENT_60H_08H)			\
870 __PMC_EV(IAP, EVENT_63H_01H)			\
871 __PMC_EV(IAP, EVENT_63H_02H)			\
872 __PMC_EV(IAP, EVENT_6CH_01H)			\
873 __PMC_EV(IAP, EVENT_80H_01H)			\
874 __PMC_EV(IAP, EVENT_80H_04H)			\
875 __PMC_EV(IAP, EVENT_80H_10H)			\
876 __PMC_EV(IAP, EVENT_81H_01H)			\
877 __PMC_EV(IAP, EVENT_81H_02H)			\
878 __PMC_EV(IAP, EVENT_82H_01H)			\
879 __PMC_EV(IAP, EVENT_83H_01H)			\
880 __PMC_EV(IAP, EVENT_85H_01H)			\
881 __PMC_EV(IAP, EVENT_85H_02H)			\
882 __PMC_EV(IAP, EVENT_85H_04H)			\
883 __PMC_EV(IAP, EVENT_85H_10H)			\
884 __PMC_EV(IAP, EVENT_85H_20H)			\
885 __PMC_EV(IAP, EVENT_85H_40H)			\
886 __PMC_EV(IAP, EVENT_85H_80H)			\
887 __PMC_EV(IAP, EVENT_87H_01H)			\
888 __PMC_EV(IAP, EVENT_87H_02H)			\
889 __PMC_EV(IAP, EVENT_87H_04H)			\
890 __PMC_EV(IAP, EVENT_87H_08H)			\
891 __PMC_EV(IAP, EVENT_87H_0FH)			\
892 __PMC_EV(IAP, EVENT_88H_01H)			\
893 __PMC_EV(IAP, EVENT_88H_02H)			\
894 __PMC_EV(IAP, EVENT_88H_04H)			\
895 __PMC_EV(IAP, EVENT_88H_07H)			\
896 __PMC_EV(IAP, EVENT_88H_08H)			\
897 __PMC_EV(IAP, EVENT_88H_10H)			\
898 __PMC_EV(IAP, EVENT_88H_20H)			\
899 __PMC_EV(IAP, EVENT_88H_30H)			\
900 __PMC_EV(IAP, EVENT_88H_40H)			\
901 __PMC_EV(IAP, EVENT_89H_01H)			\
902 __PMC_EV(IAP, EVENT_89H_02H)			\
903 __PMC_EV(IAP, EVENT_89H_04H)			\
904 __PMC_EV(IAP, EVENT_89H_07H)			\
905 __PMC_EV(IAP, EVENT_89H_08H)			\
906 __PMC_EV(IAP, EVENT_89H_10H)			\
907 __PMC_EV(IAP, EVENT_89H_20H)			\
908 __PMC_EV(IAP, EVENT_89H_30H)			\
909 __PMC_EV(IAP, EVENT_89H_40H)			\
910 __PMC_EV(IAP, EVENT_89H_7FH)			\
911 __PMC_EV(IAP, EVENT_A2H_01H)			\
912 __PMC_EV(IAP, EVENT_A2H_02H)			\
913 __PMC_EV(IAP, EVENT_A2H_04H)			\
914 __PMC_EV(IAP, EVENT_A2H_08H)			\
915 __PMC_EV(IAP, EVENT_A2H_10H)			\
916 __PMC_EV(IAP, EVENT_A2H_20H)			\
917 __PMC_EV(IAP, EVENT_A2H_40H)			\
918 __PMC_EV(IAP, EVENT_A2H_80H)			\
919 __PMC_EV(IAP, EVENT_A6H_01H)			\
920 __PMC_EV(IAP, EVENT_A7H_01H)			\
921 __PMC_EV(IAP, EVENT_A8H_01H)			\
922 __PMC_EV(IAP, EVENT_B0H_01H)			\
923 __PMC_EV(IAP, EVENT_B0H_02H)			\
924 __PMC_EV(IAP, EVENT_B0H_04H)			\
925 __PMC_EV(IAP, EVENT_B0H_08H)			\
926 __PMC_EV(IAP, EVENT_B0H_20H)			\
927 __PMC_EV(IAP, EVENT_B0H_40H)			\
928 __PMC_EV(IAP, EVENT_B1H_01H)			\
929 __PMC_EV(IAP, EVENT_B1H_02H)			\
930 __PMC_EV(IAP, EVENT_B1H_04H)			\
931 __PMC_EV(IAP, EVENT_B1H_08H)			\
932 __PMC_EV(IAP, EVENT_B1H_10H)			\
933 __PMC_EV(IAP, EVENT_B1H_20H)			\
934 __PMC_EV(IAP, EVENT_B1H_40H)			\
935 __PMC_EV(IAP, EVENT_B2H_01H)			\
936 __PMC_EV(IAP, EVENT_B7H_01H)			\
937 __PMC_EV(IAP, EVENT_B8H_01H)			\
938 __PMC_EV(IAP, EVENT_B8H_02H)			\
939 __PMC_EV(IAP, EVENT_B8H_04H)			\
940 __PMC_EV(IAP, EVENT_BAH_01H)			\
941 __PMC_EV(IAP, EVENT_BAH_02H)			\
942 __PMC_EV(IAP, EVENT_C3H_02H)			\
943 __PMC_EV(IAP, EVENT_C3H_10H)			\
944 __PMC_EV(IAP, EVENT_C5H_02H)			\
945 __PMC_EV(IAP, EVENT_C8H_20H)			\
946 __PMC_EV(IAP, EVENT_CBH_40H)			\
947 __PMC_EV(IAP, EVENT_CBH_80H)			\
948 __PMC_EV(IAP, EVENT_CCH_03H)			\
949 __PMC_EV(IAP, EVENT_D0H_01H)			\
950 __PMC_EV(IAP, EVENT_D1H_02H)			\
951 __PMC_EV(IAP, EVENT_D1H_04H)			\
952 __PMC_EV(IAP, EVENT_D1H_08H)			\
953 __PMC_EV(IAP, EVENT_DBH_01H)			\
954 __PMC_EV(IAP, EVENT_E4H_01H)			\
955 __PMC_EV(IAP, EVENT_E5H_01H)			\
956 __PMC_EV(IAP, EVENT_F3H_04H)			\
957 __PMC_EV(IAP, EVENT_F3H_08H)			\
958 __PMC_EV(IAP, EVENT_F3H_10H)			\
959 __PMC_EV(IAP, EVENT_F3H_20H)			\
960 __PMC_EV(IAP, EVENT_F4H_01H)			\
961 __PMC_EV(IAP, EVENT_F4H_02H)			\
962 __PMC_EV(IAP, EVENT_F4H_04H)			\
963 __PMC_EV(IAP, EVENT_F4H_08H)			\
964 __PMC_EV(IAP, EVENT_F4H_10H)			\
965 __PMC_EV(IAP, EVENT_F6H_01H)			\
966 __PMC_EV(IAP, EVENT_F7H_01H)			\
967 __PMC_EV(IAP, EVENT_F7H_02H)			\
968 __PMC_EV(IAP, EVENT_F7H_04H)			\
969 __PMC_EV(IAP, EVENT_F8H_01H)			\
970 __PMC_EV(IAP, EVENT_FDH_01H)			\
971 __PMC_EV(IAP, EVENT_FDH_02H)			\
972 __PMC_EV(IAP, EVENT_FDH_04H)			\
973 __PMC_EV(IAP, EVENT_FDH_08H)			\
974 __PMC_EV(IAP, EVENT_FDH_10H)			\
975 __PMC_EV(IAP, EVENT_FDH_20H)			\
976 __PMC_EV(IAP, EVENT_FDH_40H)
977 
978 #define	PMC_EV_IAP_FIRST	PMC_EV_IAP_EVENT_02H_81H
979 #define	PMC_EV_IAP_LAST		PMC_EV_IAP_EVENT_FDH_40H
980 
981 /*
982  * Map "architectural" event names to event ids.
983  */
984 #define	__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()				\
985 __PMC_EV_ALIAS("branch-instruction-retired",	IAP_EVENT_C4H_00H)	\
986 __PMC_EV_ALIAS("branch-misses-retired",		IAP_EVENT_C5H_00H)	\
987 __PMC_EV_ALIAS("instruction-retired",		IAP_EVENT_C0H_00H)	\
988 __PMC_EV_ALIAS("llc-misses",			IAP_EVENT_2EH_41H)	\
989 __PMC_EV_ALIAS("llc-reference",			IAP_EVENT_2EH_4FH)	\
990 __PMC_EV_ALIAS("unhalted-reference-cycles",	IAP_EVENT_3CH_01H)	\
991 __PMC_EV_ALIAS("unhalted-core-cycles",		IAP_EVENT_3CH_00H)
992 
993 /*
994  * Aliases for Atom PMCs.
995  */
996 #define	__PMC_EV_ALIAS_ATOM()						\
997 __PMC_EV_ALIAS_INTEL_ARCHITECTURAL()					\
998 __PMC_EV_ALIAS("BACLEARS",			IAP_EVENT_E6H_01H)	\
999 __PMC_EV_ALIAS("BOGUS_BR",			IAP_EVENT_E4H_00H)	\
1000 __PMC_EV_ALIAS("BR_BAC_MISSP_EXEC",		IAP_EVENT_8AH_00H)	\
1001 __PMC_EV_ALIAS("BR_CALL_EXEC",			IAP_EVENT_92H_00H)	\
1002 __PMC_EV_ALIAS("BR_CALL_MISSP_EXEC",		IAP_EVENT_93H_00H)	\
1003 __PMC_EV_ALIAS("BR_CND_EXEC",			IAP_EVENT_8BH_00H)	\
1004 __PMC_EV_ALIAS("BR_CND_MISSP_EXEC",		IAP_EVENT_8CH_00H)	\
1005 __PMC_EV_ALIAS("BR_IND_CALL_EXEC",		IAP_EVENT_94H_00H)	\
1006 __PMC_EV_ALIAS("BR_IND_EXEC",			IAP_EVENT_8DH_00H)	\
1007 __PMC_EV_ALIAS("BR_IND_MISSP_EXEC",		IAP_EVENT_8EH_00H)	\
1008 __PMC_EV_ALIAS("BR_INST_DECODED",		IAP_EVENT_E0H_01H)	\
1009 __PMC_EV_ALIAS("BR_INST_EXEC",			IAP_EVENT_88H_00H)	\
1010 __PMC_EV_ALIAS("BR_INST_RETIRED.ANY",		IAP_EVENT_C4H_00H)	\
1011 __PMC_EV_ALIAS("BR_INST_RETIRED.ANY1",		IAP_EVENT_C4H_0FH)	\
1012 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED",	IAP_EVENT_C5H_00H)	\
1013 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_NOT_TAKEN",			\
1014     IAP_EVENT_C4H_02H)							\
1015 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_TAKEN",	IAP_EVENT_C4H_08H)	\
1016 __PMC_EV_ALIAS("BR_INST_RETIRED.PRED_NOT_TAKEN",IAP_EVENT_C4H_01H)	\
1017 __PMC_EV_ALIAS("BR_INST_RETIRED.PRED_TAKEN",	IAP_EVENT_C4H_04H)	\
1018 __PMC_EV_ALIAS("BR_INST_RETIRED.TAKEN",		IAP_EVENT_C4H_0CH)	\
1019 __PMC_EV_ALIAS("BR_MISSP_EXEC",			IAP_EVENT_89H_00H)	\
1020 __PMC_EV_ALIAS("BR_RET_BAC_MISSP_EXEC",		IAP_EVENT_91H_00H)	\
1021 __PMC_EV_ALIAS("BR_RET_EXEC",			IAP_EVENT_8FH_00H)	\
1022 __PMC_EV_ALIAS("BR_RET_MISSP_EXEC",		IAP_EVENT_90H_00H)	\
1023 __PMC_EV_ALIAS("BR_TKN_BUBBLE_1",		IAP_EVENT_97H_00H)	\
1024 __PMC_EV_ALIAS("BR_TKN_BUBBLE_2",		IAP_EVENT_98H_00H)	\
1025 __PMC_EV_ALIAS("BUSQ_EMPTY",			IAP_EVENT_7DH)		\
1026 __PMC_EV_ALIAS("BUS_BNR_DRV",			IAP_EVENT_61H)		\
1027 __PMC_EV_ALIAS("BUS_DATA_RCV",			IAP_EVENT_64H)		\
1028 __PMC_EV_ALIAS("BUS_DRDY_CLOCKS",		IAP_EVENT_62H)		\
1029 __PMC_EV_ALIAS("BUS_HITM_DRV",			IAP_EVENT_7BH)		\
1030 __PMC_EV_ALIAS("BUS_HIT_DRV",			IAP_EVENT_7AH)		\
1031 __PMC_EV_ALIAS("BUS_IO_WAIT",			IAP_EVENT_7FH)		\
1032 __PMC_EV_ALIAS("BUS_LOCK_CLOCKS",		IAP_EVENT_63H)		\
1033 __PMC_EV_ALIAS("BUS_REQUEST_OUTSTANDING",	IAP_EVENT_60H)		\
1034 __PMC_EV_ALIAS("BUS_TRANS_ANY",			IAP_EVENT_70H)		\
1035 __PMC_EV_ALIAS("BUS_TRANS_BRD",			IAP_EVENT_65H)		\
1036 __PMC_EV_ALIAS("BUS_TRANS_BURST",		IAP_EVENT_6EH)		\
1037 __PMC_EV_ALIAS("BUS_TRANS_DEF",			IAP_EVENT_6DH)		\
1038 __PMC_EV_ALIAS("BUS_TRANS_IFETCH",		IAP_EVENT_68H)		\
1039 __PMC_EV_ALIAS("BUS_TRANS_INVAL",		IAP_EVENT_69H)		\
1040 __PMC_EV_ALIAS("BUS_TRANS_IO",			IAP_EVENT_6CH)		\
1041 __PMC_EV_ALIAS("BUS_TRANS_MEM",			IAP_EVENT_6FH)		\
1042 __PMC_EV_ALIAS("BUS_TRANS_P",			IAP_EVENT_6BH)		\
1043 __PMC_EV_ALIAS("BUS_TRANS_PWR",			IAP_EVENT_6AH)		\
1044 __PMC_EV_ALIAS("BUS_TRANS_RFO",			IAP_EVENT_66H)		\
1045 __PMC_EV_ALIAS("BUS_TRANS_WB",			IAP_EVENT_67H)		\
1046 __PMC_EV_ALIAS("CMP_SNOOP",			IAP_EVENT_78H)		\
1047 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.BUS",		IAP_EVENT_3CH_01H)	\
1048 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.CORE_P",	IAP_EVENT_3CH_00H)	\
1049 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.NO_OTHER",	IAP_EVENT_3CH_02H)	\
1050 __PMC_EV_ALIAS("CYCLES_DIV_BUSY",		IAP_EVENT_14H_01H)	\
1051 __PMC_EV_ALIAS("CYCLES_INT_MASKED.CYCLES_INT_MASKED",			\
1052     IAP_EVENT_C6H_01H)							\
1053 __PMC_EV_ALIAS("CYCLES_INT_MASKED.CYCLES_INT_PENDING_AND_MASKED",	\
1054     IAP_EVENT_C6H_02H)							\
1055 __PMC_EV_ALIAS("CYCLES_L1I_MEM_STALLED",	IAP_EVENT_86H_00H)	\
1056 __PMC_EV_ALIAS("DATA_TLB_MISSES.DTLB_MISS",	IAP_EVENT_08H_07H)	\
1057 __PMC_EV_ALIAS("DATA_TLB_MISSES.DTLB_MISS_LD",	IAP_EVENT_08H_05H)	\
1058 __PMC_EV_ALIAS("DATA_TLB_MISSES.DTLB_MISS_ST",	IAP_EVENT_08H_06H)	\
1059 __PMC_EV_ALIAS("DATA_TLB_MISSES.UTLB_MISS_LD",	IAP_EVENT_08H_09H)	\
1060 __PMC_EV_ALIAS("DELAYED_BYPASS.FP",		IAP_EVENT_19H_00H)	\
1061 __PMC_EV_ALIAS("DELAYED_BYPASS.LOAD",		IAP_EVENT_19H_01H)	\
1062 __PMC_EV_ALIAS("DELAYED_BYPASS.SIMD",		IAP_EVENT_19H_02H)	\
1063 __PMC_EV_ALIAS("DIV",				IAP_EVENT_13H_00H)	\
1064 __PMC_EV_ALIAS("DIV.AR",			IAP_EVENT_13H_81H)	\
1065 __PMC_EV_ALIAS("DIV.S",				IAP_EVENT_13H_01H)	\
1066 __PMC_EV_ALIAS("DTLB_MISSES.ANY",		IAP_EVENT_08H_01H)	\
1067 __PMC_EV_ALIAS("DTLB_MISSES.L0_MISS_LD",	IAP_EVENT_08H_04H)	\
1068 __PMC_EV_ALIAS("DTLB_MISSES.MISS_LD",		IAP_EVENT_08H_02H)	\
1069 __PMC_EV_ALIAS("DTLB_MISSES.MISS_ST",		IAP_EVENT_08H_08H)	\
1070 __PMC_EV_ALIAS("EIST_TRANS",			IAP_EVENT_3AH_00H)	\
1071 __PMC_EV_ALIAS("ESP.ADDITIONS",			IAP_EVENT_ABH_02H)	\
1072 __PMC_EV_ALIAS("ESP.SYNCH",			IAP_EVENT_ABH_01H)	\
1073 __PMC_EV_ALIAS("EXT_SNOOP",			IAP_EVENT_77H)		\
1074 __PMC_EV_ALIAS("FP_ASSIST",			IAP_EVENT_11H_01H)	\
1075 __PMC_EV_ALIAS("FP_ASSIST.AR",			IAP_EVENT_11H_81H)	\
1076 __PMC_EV_ALIAS("FP_COMP_OPS_EXE",		IAP_EVENT_10H_00H)	\
1077 __PMC_EV_ALIAS("FP_MMX_TRANS_TO_FP",		IAP_EVENT_CCH_02H)	\
1078 __PMC_EV_ALIAS("FP_MMX_TRANS_TO_MMX",		IAP_EVENT_CCH_01H)	\
1079 __PMC_EV_ALIAS("HW_INT_RCV",			IAP_EVENT_C8H_00H)	\
1080 __PMC_EV_ALIAS("ICACHE.ACCESSES",		IAP_EVENT_80H_03H)	\
1081 __PMC_EV_ALIAS("ICACHE.MISSES",			IAP_EVENT_80H_02H)	\
1082 __PMC_EV_ALIAS("IDLE_DURING_DIV",		IAP_EVENT_18H_00H)	\
1083 __PMC_EV_ALIAS("ILD_STALL",			IAP_EVENT_87H_00H)	\
1084 __PMC_EV_ALIAS("INST_QUEUE.FULL",		IAP_EVENT_83H_02H)	\
1085 __PMC_EV_ALIAS("INST_RETIRED.ANY_P",		IAP_EVENT_C0H_00H)	\
1086 __PMC_EV_ALIAS("INST_RETIRED.LOADS",		IAP_EVENT_C0H_01H)	\
1087 __PMC_EV_ALIAS("INST_RETIRED.OTHER",		IAP_EVENT_C0H_04H)	\
1088 __PMC_EV_ALIAS("INST_RETIRED.STORES",		IAP_EVENT_C0H_02H)	\
1089 __PMC_EV_ALIAS("ITLB.FLUSH",			IAP_EVENT_82H_04H)	\
1090 __PMC_EV_ALIAS("ITLB.LARGE_MISS",		IAP_EVENT_82H_10H)	\
1091 __PMC_EV_ALIAS("ITLB.MISSES",			IAP_EVENT_82H_02H)	\
1092 __PMC_EV_ALIAS("ITLB.SMALL_MISS",		IAP_EVENT_82H_02H)	\
1093 __PMC_EV_ALIAS("ITLB_MISS_RETIRED",		IAP_EVENT_C9H_00H)	\
1094 __PMC_EV_ALIAS("L1D_ALL_CACHE_REF",		IAP_EVENT_43H_02H)	\
1095 __PMC_EV_ALIAS("L1D_ALL_REF",			IAP_EVENT_43H_01H)	\
1096 __PMC_EV_ALIAS("L1D_CACHE.LD",			IAP_EVENT_40H_21H)	\
1097 __PMC_EV_ALIAS("L1D_CACHE.ST",			IAP_EVENT_41H_22H)	\
1098 __PMC_EV_ALIAS("L1D_CACHE_LOCK",		IAP_EVENT_42H)		\
1099 __PMC_EV_ALIAS("L1D_CACHE_LOCK_DURATION",	IAP_EVENT_42H_10H)	\
1100 __PMC_EV_ALIAS("L1D_M_EVICT",			IAP_EVENT_47H_00H)	\
1101 __PMC_EV_ALIAS("L1D_M_REPL",			IAP_EVENT_46H_00H)	\
1102 __PMC_EV_ALIAS("L1D_PEND_MISS",			IAP_EVENT_48H_00H)	\
1103 __PMC_EV_ALIAS("L1D_PREFETCH.REQUESTS",		IAP_EVENT_4EH_10H)	\
1104 __PMC_EV_ALIAS("L1D_REPL",			IAP_EVENT_45H_0FH)	\
1105 __PMC_EV_ALIAS("L1D_SPLIT.LOADS",		IAP_EVENT_49H_01H)	\
1106 __PMC_EV_ALIAS("L1D_SPLIT.STORES",		IAP_EVENT_49H_02H)	\
1107 __PMC_EV_ALIAS("L1I_MISSES",			IAP_EVENT_81H_00H)	\
1108 __PMC_EV_ALIAS("L1I_READS",			IAP_EVENT_80H_00H)	\
1109 __PMC_EV_ALIAS("L2_ADS",			IAP_EVENT_21H)		\
1110 __PMC_EV_ALIAS("L2_DBUS_BUSY_RD",		IAP_EVENT_23H)		\
1111 __PMC_EV_ALIAS("L2_IFETCH",			IAP_EVENT_28H)		\
1112 __PMC_EV_ALIAS("L2_LD",				IAP_EVENT_29H)		\
1113 __PMC_EV_ALIAS("L2_LINES_IN",			IAP_EVENT_24H)		\
1114 __PMC_EV_ALIAS("L2_LINES_OUT",			IAP_EVENT_26H)		\
1115 __PMC_EV_ALIAS("L2_LOCK",			IAP_EVENT_2BH)		\
1116 __PMC_EV_ALIAS("L2_M_LINES_IN",			IAP_EVENT_25H)		\
1117 __PMC_EV_ALIAS("L2_M_LINES_OUT",		IAP_EVENT_27H)		\
1118 __PMC_EV_ALIAS("L2_NO_REQ",			IAP_EVENT_32H)		\
1119 __PMC_EV_ALIAS("L2_REJECT_BUSQ",		IAP_EVENT_30H)		\
1120 __PMC_EV_ALIAS("L2_RQSTS",			IAP_EVENT_2EH)		\
1121 __PMC_EV_ALIAS("L2_RQSTS.SELF.DEMAND.I_STATE",	IAP_EVENT_2EH_41H)	\
1122 __PMC_EV_ALIAS("L2_RQSTS.SELF.DEMAND.MESI",	IAP_EVENT_2EH_4FH)	\
1123 __PMC_EV_ALIAS("L2_ST",				IAP_EVENT_2AH)		\
1124 __PMC_EV_ALIAS("LOAD_BLOCK.L1D",		IAP_EVENT_03H_20H)	\
1125 __PMC_EV_ALIAS("LOAD_BLOCK.OVERLAP_STORE",	IAP_EVENT_03H_08H)	\
1126 __PMC_EV_ALIAS("LOAD_BLOCK.STA",		IAP_EVENT_03H_02H)	\
1127 __PMC_EV_ALIAS("LOAD_BLOCK.STD",		IAP_EVENT_03H_04H)	\
1128 __PMC_EV_ALIAS("LOAD_BLOCK.UNTIL_RETIRE",	IAP_EVENT_03H_10H)	\
1129 __PMC_EV_ALIAS("LOAD_HIT_PRE",			IAP_EVENT_4CH_00H)	\
1130 __PMC_EV_ALIAS("MACHINE_CLEARS.SMC",		IAP_EVENT_C3H_01H)	\
1131 __PMC_EV_ALIAS("MACHINE_NUKES.MEM_ORDER",	IAP_EVENT_C3H_04H)	\
1132 __PMC_EV_ALIAS("MACRO_INSTS.ALL_DECODED",	IAP_EVENT_AAH_03H)	\
1133 __PMC_EV_ALIAS("MACRO_INSTS.CISC_DECODED",	IAP_EVENT_AAH_02H)	\
1134 __PMC_EV_ALIAS("MEMORY_DISAMBIGUATION.RESET",	IAP_EVENT_09H_01H)	\
1135 __PMC_EV_ALIAS("MEMORY_DISAMBIGUATION.SUCCESS",	IAP_EVENT_09H_02H)	\
1136 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.DTLB_MISS",	IAP_EVENT_CBH_04H)	\
1137 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_HIT",	IAP_EVENT_CBH_01H)	\
1138 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_LINE_MISS",	IAP_EVENT_CBH_08H)	\
1139 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_MISS",	IAP_EVENT_CBH_02H)	\
1140 __PMC_EV_ALIAS("MUL",				IAP_EVENT_12H_00H)	\
1141 __PMC_EV_ALIAS("MUL.AR",			IAP_EVENT_12H_81H)	\
1142 __PMC_EV_ALIAS("MUL.S",				IAP_EVENT_12H_01H)	\
1143 __PMC_EV_ALIAS("PAGE_WALKS.CYCLES",		IAP_EVENT_0CH_03H)	\
1144 __PMC_EV_ALIAS("PAGE_WALKS.WALKS",		IAP_EVENT_0CH_03H)	\
1145 __PMC_EV_ALIAS("PREFETCH.PREFETCHNTA",		IAP_EVENT_07H_08H)	\
1146 __PMC_EV_ALIAS("PREFETCH.PREFETCHT0",		IAP_EVENT_07H_01H)	\
1147 __PMC_EV_ALIAS("PREFETCH.SW_L2",		IAP_EVENT_07H_06H)	\
1148 __PMC_EV_ALIAS("PREF_RQSTS_DN",			IAP_EVENT_F8H_00H)	\
1149 __PMC_EV_ALIAS("PREF_RQSTS_UP",			IAP_EVENT_F0H_00H)	\
1150 __PMC_EV_ALIAS("RAT_STALLS.ANY",		IAP_EVENT_D2H_0FH)	\
1151 __PMC_EV_ALIAS("RAT_STALLS.FLAGS",		IAP_EVENT_D2H_04H)	\
1152 __PMC_EV_ALIAS("RAT_STALLS.FPSW",		IAP_EVENT_D2H_08H)	\
1153 __PMC_EV_ALIAS("RAT_STALLS.PARTIAL_CYCLES",	IAP_EVENT_D2H_02H)	\
1154 __PMC_EV_ALIAS("RAT_STALLS.ROB_READ_PORT",	IAP_EVENT_D2H_01H)	\
1155 __PMC_EV_ALIAS("RESOURCE_STALLS.ANY",		IAP_EVENT_DCH_1FH)	\
1156 __PMC_EV_ALIAS("RESOURCE_STALLS.BR_MISS_CLEAR",	IAP_EVENT_DCH_10H)	\
1157 __PMC_EV_ALIAS("RESOURCE_STALLS.FPCW",		IAP_EVENT_DCH_08H)	\
1158 __PMC_EV_ALIAS("RESOURCE_STALLS.LD_ST",		IAP_EVENT_DCH_04H)	\
1159 __PMC_EV_ALIAS("RESOURCE_STALLS.ROB_FULL",	IAP_EVENT_DCH_01H)	\
1160 __PMC_EV_ALIAS("RESOURCE_STALLS.RS_FULL",	IAP_EVENT_DCH_02H)	\
1161 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED",		IAP_EVENT_A0H_00H)	\
1162 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT0",	IAP_EVENT_A1H_01H)	\
1163 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT1",	IAP_EVENT_A1H_02H)	\
1164 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT2",	IAP_EVENT_A1H_04H)	\
1165 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT3",	IAP_EVENT_A1H_08H)	\
1166 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT4",	IAP_EVENT_A1H_10H)	\
1167 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT5",	IAP_EVENT_A1H_20H)	\
1168 __PMC_EV_ALIAS("SB_DRAIN_CYCLES",		IAP_EVENT_04H_01H)	\
1169 __PMC_EV_ALIAS("SEGMENT_REG_LOADS.ANY",		IAP_EVENT_06H_00H)	\
1170 __PMC_EV_ALIAS("SEG_REG_RENAMES.ANY",		IAP_EVENT_D5H_0FH)	\
1171 __PMC_EV_ALIAS("SEG_REG_RENAMES.DS",		IAP_EVENT_D5H_02H)	\
1172 __PMC_EV_ALIAS("SEG_REG_RENAMES.ES",		IAP_EVENT_D5H_01H)	\
1173 __PMC_EV_ALIAS("SEG_REG_RENAMES.FS",		IAP_EVENT_D5H_04H)	\
1174 __PMC_EV_ALIAS("SEG_REG_RENAMES.GS",		IAP_EVENT_D5H_08H)	\
1175 __PMC_EV_ALIAS("SEG_RENAME_STALLS.ANY",		IAP_EVENT_D4H_0FH)	\
1176 __PMC_EV_ALIAS("SEG_RENAME_STALLS.DS",		IAP_EVENT_D4H_02H)	\
1177 __PMC_EV_ALIAS("SEG_RENAME_STALLS.ES",		IAP_EVENT_D4H_01H)	\
1178 __PMC_EV_ALIAS("SEG_RENAME_STALLS.FS",		IAP_EVENT_D4H_04H)	\
1179 __PMC_EV_ALIAS("SEG_RENAME_STALLS.GS",		IAP_EVENT_D4H_08H)	\
1180 __PMC_EV_ALIAS("SIMD_ASSIST",			IAP_EVENT_CDH_00H)	\
1181 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.PACKED_DOUBLE",			\
1182     IAP_EVENT_CAH_04H)							\
1183 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.PACKED_SINGLE",			\
1184     IAP_EVENT_CAH_01H)							\
1185 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.SCALAR_DOUBLE",			\
1186     IAP_EVENT_CAH_08H)							\
1187 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.SCALAR_SINGLE",			\
1188     IAP_EVENT_CAH_02H)							\
1189 __PMC_EV_ALIAS("SIMD_INSTR_RETIRED",		IAP_EVENT_CEH_00H)	\
1190 __PMC_EV_ALIAS("SIMD_INST_RETIRED.ANY",		IAP_EVENT_C7H_1FH)	\
1191 __PMC_EV_ALIAS("SIMD_INST_RETIRED.PACKED_DOUBLE", IAP_EVENT_C7H_04H)	\
1192 __PMC_EV_ALIAS("SIMD_INST_RETIRED.PACKED_SINGLE", IAP_EVENT_C7H_01H)	\
1193 __PMC_EV_ALIAS("SIMD_INST_RETIRED.SCALAR_DOUBLE", IAP_EVENT_C7H_08H)	\
1194 __PMC_EV_ALIAS("SIMD_INST_RETIRED.SCALAR_SINGLE", IAP_EVENT_C7H_02H)	\
1195 __PMC_EV_ALIAS("SIMD_INST_RETIRED.VECTOR",	IAP_EVENT_C7H_10H)	\
1196 __PMC_EV_ALIAS("SIMD_SAT_INSTR_RETIRED",	IAP_EVENT_CFH_00H)	\
1197 __PMC_EV_ALIAS("SIMD_SAT_UOP_EXEC.AR",		IAP_EVENT_B1H_80H)	\
1198 __PMC_EV_ALIAS("SIMD_SAT_UOP_EXEC.S",		IAP_EVENT_B1H_00H)	\
1199 __PMC_EV_ALIAS("SIMD_UOPS_EXEC.AR",		IAP_EVENT_B0H_80H)	\
1200 __PMC_EV_ALIAS("SIMD_UOPS_EXEC.S",		IAP_EVENT_B0H_00H)	\
1201 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.ARITHMETIC.AR", IAP_EVENT_B3H_A0H)	\
1202 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.ARITHMETIC.S",  IAP_EVENT_B3H_20H)	\
1203 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.LOGICAL.AR",	IAP_EVENT_B3H_90H)	\
1204 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.LOGICAL.S",	IAP_EVENT_B3H_10H)	\
1205 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.MUL.AR",	IAP_EVENT_B3H_81H)	\
1206 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.MUL.S",	IAP_EVENT_B3H_01H)	\
1207 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.PACK.AR",	IAP_EVENT_B3H_84H)	\
1208 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.PACK.S",	IAP_EVENT_B3H_04H)	\
1209 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.SHIFT.AR",	IAP_EVENT_B3H_82H)	\
1210 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.SHIFT.S",	IAP_EVENT_B3H_02H)	\
1211 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.UNPACK.AR",	IAP_EVENT_B3H_88H)	\
1212 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.UNPACK.S",	IAP_EVENT_B3H_08H)	\
1213 __PMC_EV_ALIAS("SNOOP_STALL_DRV",		IAP_EVENT_7EH)		\
1214 __PMC_EV_ALIAS("SSE_PRE_EXEC.L2",		IAP_EVENT_07H_02H)	\
1215 __PMC_EV_ALIAS("SSE_PRE_EXEC.STORES",		IAP_EVENT_07H_03H)	\
1216 __PMC_EV_ALIAS("SSE_PRE_MISS.L1",		IAP_EVENT_4BH_01H)	\
1217 __PMC_EV_ALIAS("SSE_PRE_MISS.L2",		IAP_EVENT_4BH_02H)	\
1218 __PMC_EV_ALIAS("SSE_PRE_MISS.NTA",		IAP_EVENT_4BH_00H)	\
1219 __PMC_EV_ALIAS("STORE_BLOCK.ORDER",		IAP_EVENT_04H_02H)	\
1220 __PMC_EV_ALIAS("STORE_BLOCK.SNOOP",		IAP_EVENT_04H_08H)	\
1221 __PMC_EV_ALIAS("STORE_FORWARDS.GOOD",		IAP_EVENT_02H_81H)	\
1222 __PMC_EV_ALIAS("THERMAL_TRIP",			IAP_EVENT_3BH_C0H)	\
1223 __PMC_EV_ALIAS("UOPS_RETIRED.ANY",		IAP_EVENT_C2H_10H)	\
1224 __PMC_EV_ALIAS("UOPS_RETIRED.FUSED",		IAP_EVENT_C2H_07H)	\
1225 __PMC_EV_ALIAS("UOPS_RETIRED.LD_IND_BR",	IAP_EVENT_C2H_01H)	\
1226 __PMC_EV_ALIAS("UOPS_RETIRED.MACRO_FUSION",	IAP_EVENT_C2H_04H)	\
1227 __PMC_EV_ALIAS("UOPS_RETIRED.NON_FUSED",	IAP_EVENT_C2H_08H)	\
1228 __PMC_EV_ALIAS("UOPS_RETIRED.STD_STA",		IAP_EVENT_C2H_02H)	\
1229 __PMC_EV_ALIAS("X87_COMP_OPS_EXE.ANY.AR",	IAP_EVENT_10H_81H)	\
1230 __PMC_EV_ALIAS("X87_COMP_OPS_EXE.ANY.S",	IAP_EVENT_10H_01H)	\
1231 __PMC_EV_ALIAS("X87_OPS_RETIRED.ANY",		IAP_EVENT_C1H_FEH)	\
1232 __PMC_EV_ALIAS("X87_OPS_RETIRED.FXCH",		IAP_EVENT_C1H_01H)
1233 
1234 /*
1235  * Aliases for Core PMC events.
1236  */
1237 #define	__PMC_EV_ALIAS_CORE()					\
1238 __PMC_EV_ALIAS_INTEL_ARCHITECTURAL()				\
1239 __PMC_EV_ALIAS("BAClears",		IAP_EVENT_E6H_00H)	\
1240 __PMC_EV_ALIAS("BTB_Misses",		IAP_EVENT_E2H_00H)	\
1241 __PMC_EV_ALIAS("Br_BAC_Missp_Exec",	IAP_EVENT_8AH_00H)	\
1242 __PMC_EV_ALIAS("Br_Bogus",		IAP_EVENT_E4H_00H)	\
1243 __PMC_EV_ALIAS("Br_Call_Exec",		IAP_EVENT_92H_00H)	\
1244 __PMC_EV_ALIAS("Br_Call_Missp_Exec",	IAP_EVENT_93H_00H)	\
1245 __PMC_EV_ALIAS("Br_Cnd_Exec",		IAP_EVENT_8BH_00H)	\
1246 __PMC_EV_ALIAS("Br_Cnd_Missp_Exec",	IAP_EVENT_8CH_00H)	\
1247 __PMC_EV_ALIAS("Br_Ind_Call_Exec",	IAP_EVENT_94H_00H)	\
1248 __PMC_EV_ALIAS("Br_Ind_Exec",		IAP_EVENT_8DH_00H)	\
1249 __PMC_EV_ALIAS("Br_Ind_Missp_Exec",	IAP_EVENT_8EH_00H)	\
1250 __PMC_EV_ALIAS("Br_Inst_Exec",		IAP_EVENT_88H_00H)	\
1251 __PMC_EV_ALIAS("Br_Instr_Decoded",	IAP_EVENT_E0H_00H)	\
1252 __PMC_EV_ALIAS("Br_Instr_Ret",		IAP_EVENT_C4H_00H)	\
1253 __PMC_EV_ALIAS("Br_MisPred_Ret",	IAP_EVENT_C5H_00H)	\
1254 __PMC_EV_ALIAS("Br_MisPred_Taken_Ret",	IAP_EVENT_CAH_00H)	\
1255 __PMC_EV_ALIAS("Br_Missp_Exec",		IAP_EVENT_89H_00H)	\
1256 __PMC_EV_ALIAS("Br_Ret_BAC_Missp_Exec",	IAP_EVENT_91H_00H)	\
1257 __PMC_EV_ALIAS("Br_Ret_Exec",		IAP_EVENT_8FH_00H)	\
1258 __PMC_EV_ALIAS("Br_Ret_Missp_Exec",	IAP_EVENT_90H_00H)	\
1259 __PMC_EV_ALIAS("Br_Taken_Ret",		IAP_EVENT_C9H_00H)	\
1260 __PMC_EV_ALIAS("Bus_BNR_Clocks",	IAP_EVENT_61H_00H)	\
1261 __PMC_EV_ALIAS("Bus_DRDY_Clocks",	IAP_EVENT_62H_00H)	\
1262 __PMC_EV_ALIAS("Bus_Data_Rcv",		IAP_EVENT_64H_40H)	\
1263 __PMC_EV_ALIAS("Bus_Locks_Clocks",	IAP_EVENT_63H)		\
1264 __PMC_EV_ALIAS("Bus_Not_In_Use",	IAP_EVENT_7DH)		\
1265 __PMC_EV_ALIAS("Bus_Req_Outstanding",	IAP_EVENT_60H)		\
1266 __PMC_EV_ALIAS("Bus_Snoop_Stall",	IAP_EVENT_7EH_00H)	\
1267 __PMC_EV_ALIAS("Bus_Snoops",		IAP_EVENT_77H)		\
1268 __PMC_EV_ALIAS("Bus_Trans_Any",		IAP_EVENT_70H)		\
1269 __PMC_EV_ALIAS("Bus_Trans_Brd",		IAP_EVENT_65H)		\
1270 __PMC_EV_ALIAS("Bus_Trans_Burst",	IAP_EVENT_6EH)		\
1271 __PMC_EV_ALIAS("Bus_Trans_Def",		IAP_EVENT_6DH)		\
1272 __PMC_EV_ALIAS("Bus_Trans_IO",		IAP_EVENT_6CH)		\
1273 __PMC_EV_ALIAS("Bus_Trans_Ifetch",	IAP_EVENT_68H)		\
1274 __PMC_EV_ALIAS("Bus_Trans_Inval",	IAP_EVENT_69H)		\
1275 __PMC_EV_ALIAS("Bus_Trans_Mem",		IAP_EVENT_6FH)		\
1276 __PMC_EV_ALIAS("Bus_Trans_P",		IAP_EVENT_6BH)		\
1277 __PMC_EV_ALIAS("Bus_Trans_Pwr",		IAP_EVENT_6AH)		\
1278 __PMC_EV_ALIAS("Bus_Trans_RFO",		IAP_EVENT_66H)		\
1279 __PMC_EV_ALIAS("Bus_Trans_WB",		IAP_EVENT_67H)		\
1280 __PMC_EV_ALIAS("Cycles_Div_Busy",	IAP_EVENT_14H_00H)	\
1281 __PMC_EV_ALIAS("Cycles_Int_Masked",	IAP_EVENT_C6H_00H)	\
1282 __PMC_EV_ALIAS("Cycles_Int_Pending_Masked", IAP_EVENT_C7H_00H)	\
1283 __PMC_EV_ALIAS("DCU_Snoop_To_Share",	IAP_EVENT_78H)		\
1284 __PMC_EV_ALIAS("DCache_Cache_LD",	IAP_EVENT_40H)		\
1285 __PMC_EV_ALIAS("DCache_Cache_Lock",	IAP_EVENT_42H)		\
1286 __PMC_EV_ALIAS("DCache_Cache_ST",	IAP_EVENT_41H)		\
1287 __PMC_EV_ALIAS("DCache_M_Evict",	IAP_EVENT_47H_00H)	\
1288 __PMC_EV_ALIAS("DCache_M_Repl",		IAP_EVENT_46H_00H)	\
1289 __PMC_EV_ALIAS("DCache_Pend_Miss",	IAP_EVENT_48H_00H)	\
1290 __PMC_EV_ALIAS("DCache_Repl",		IAP_EVENT_45H_0FH)	\
1291 __PMC_EV_ALIAS("Data_Mem_Cache_Ref",	IAP_EVENT_44H_02H)	\
1292 __PMC_EV_ALIAS("Data_Mem_Ref",		IAP_EVENT_43H_01H)	\
1293 __PMC_EV_ALIAS("Dbus_Busy",		IAP_EVENT_22H)		\
1294 __PMC_EV_ALIAS("Dbus_Busy_Rd",		IAP_EVENT_23H)		\
1295 __PMC_EV_ALIAS("Div",			IAP_EVENT_13H_00H)	\
1296 __PMC_EV_ALIAS("Dtlb_Miss",		IAP_EVENT_49H_00H)	\
1297 __PMC_EV_ALIAS("ESP_Uops",		IAP_EVENT_D7H_00H)	\
1298 __PMC_EV_ALIAS("EST_Trans",		IAP_EVENT_3AH)		\
1299 __PMC_EV_ALIAS("FP_Assist",		IAP_EVENT_11H_00H)	\
1300 __PMC_EV_ALIAS("FP_Comp_Instr_Ret",	IAP_EVENT_C1H_00H)	\
1301 __PMC_EV_ALIAS("FP_Comps_Op_Exe",	IAP_EVENT_10H_00H)	\
1302 __PMC_EV_ALIAS("FP_MMX_Trans",		IAP_EVENT_CCH_01H)	\
1303 __PMC_EV_ALIAS("Fused_Ld_Uops_Ret",	IAP_EVENT_DAH_01H)	\
1304 __PMC_EV_ALIAS("Fused_St_Uops_Ret",	IAP_EVENT_DAH_02H)	\
1305 __PMC_EV_ALIAS("Fused_Uops_Ret",	IAP_EVENT_DAH_00H)	\
1306 __PMC_EV_ALIAS("HW_Int_Rx",		IAP_EVENT_C8H_00H)	\
1307 __PMC_EV_ALIAS("ICache_Misses",		IAP_EVENT_81H_00H)	\
1308 __PMC_EV_ALIAS("ICache_Reads",		IAP_EVENT_80H_00H)	\
1309 __PMC_EV_ALIAS("IFU_Mem_Stall",		IAP_EVENT_86H_00H)	\
1310 __PMC_EV_ALIAS("ILD_Stall",		IAP_EVENT_87H_00H)	\
1311 __PMC_EV_ALIAS("ITLB_Misses",		IAP_EVENT_85H_00H)	\
1312 __PMC_EV_ALIAS("Instr_Decoded",		IAP_EVENT_D0H_00H)	\
1313 __PMC_EV_ALIAS("Instr_Ret",		IAP_EVENT_C0H_00H)	\
1314 __PMC_EV_ALIAS("L1_Pref_Req",		IAP_EVENT_4FH_00H)	\
1315 __PMC_EV_ALIAS("L2_ADS",		IAP_EVENT_21H)		\
1316 __PMC_EV_ALIAS("L2_IFetch",		IAP_EVENT_28H)		\
1317 __PMC_EV_ALIAS("L2_LD",			IAP_EVENT_29H)		\
1318 __PMC_EV_ALIAS("L2_Lines_In",		IAP_EVENT_24H)		\
1319 __PMC_EV_ALIAS("L2_Lines_Out",		IAP_EVENT_26H)		\
1320 __PMC_EV_ALIAS("L2_M_Lines_In",		IAP_EVENT_25H)		\
1321 __PMC_EV_ALIAS("L2_M_Lines_Out",	IAP_EVENT_27H)		\
1322 __PMC_EV_ALIAS("L2_No_Request_Cycles",	IAP_EVENT_32H)		\
1323 __PMC_EV_ALIAS("L2_Reject_Cycles",	IAP_EVENT_30H)		\
1324 __PMC_EV_ALIAS("L2_Rqsts",		IAP_EVENT_2EH)		\
1325 __PMC_EV_ALIAS("L2_ST",			IAP_EVENT_2AH)		\
1326 __PMC_EV_ALIAS("LD_Blocks",		IAP_EVENT_03H_00H)	\
1327 __PMC_EV_ALIAS("LLC_Misses",		IAP_EVENT_2EH_41H)	\
1328 __PMC_EV_ALIAS("LLC_Reference",		IAP_EVENT_2EH_4FH)	\
1329 __PMC_EV_ALIAS("MMX_Assist",		IAP_EVENT_CDH_00H)	\
1330 __PMC_EV_ALIAS("MMX_FP_Trans",		IAP_EVENT_CCH_00H)	\
1331 __PMC_EV_ALIAS("MMX_Instr_Exec",	IAP_EVENT_B0H_00H)	\
1332 __PMC_EV_ALIAS("MMX_Instr_Ret",		IAP_EVENT_CEH_00H)	\
1333 __PMC_EV_ALIAS("Misalign_Mem_Ref",	IAP_EVENT_05H_00H)	\
1334 __PMC_EV_ALIAS("Mul",			IAP_EVENT_12H_00H)	\
1335 __PMC_EV_ALIAS("NonHlt_Ref_Cycles",	IAP_EVENT_3CH_01H)	\
1336 __PMC_EV_ALIAS("Pref_Rqsts_Dn",		IAP_EVENT_F8H_00H)	\
1337 __PMC_EV_ALIAS("Pref_Rqsts_Up",		IAP_EVENT_F0H_00H)	\
1338 __PMC_EV_ALIAS("Resource_Stall",	IAP_EVENT_A2H_00H)	\
1339 __PMC_EV_ALIAS("SD_Drains",		IAP_EVENT_04H_00H)	\
1340 __PMC_EV_ALIAS("SIMD_FP_DP_P_Comp_Ret",	IAP_EVENT_D9H_02H)	\
1341 __PMC_EV_ALIAS("SIMD_FP_DP_P_Ret",	IAP_EVENT_D8H_02H)	\
1342 __PMC_EV_ALIAS("SIMD_FP_DP_S_Comp_Ret",	IAP_EVENT_D9H_03H)	\
1343 __PMC_EV_ALIAS("SIMD_FP_DP_S_Ret",	IAP_EVENT_D8H_03H)	\
1344 __PMC_EV_ALIAS("SIMD_FP_SP_P_Comp_Ret",	IAP_EVENT_D9H_00H)	\
1345 __PMC_EV_ALIAS("SIMD_FP_SP_Ret",	IAP_EVENT_D8H_00H)	\
1346 __PMC_EV_ALIAS("SIMD_FP_SP_S_Comp_Ret",	IAP_EVENT_D9H_01H)	\
1347 __PMC_EV_ALIAS("SIMD_FP_SP_S_Ret",	IAP_EVENT_D8H_01H)	\
1348 __PMC_EV_ALIAS("SIMD_Int_128_Ret",	IAP_EVENT_D8H_04H)	\
1349 __PMC_EV_ALIAS("SIMD_Int_Pari_Exec",	IAP_EVENT_B3H_20H)	\
1350 __PMC_EV_ALIAS("SIMD_Int_Pck_Exec",	IAP_EVENT_B3H_04H)	\
1351 __PMC_EV_ALIAS("SIMD_Int_Plog_Exec",	IAP_EVENT_B3H_10H)	\
1352 __PMC_EV_ALIAS("SIMD_Int_Pmul_Exec",	IAP_EVENT_B3H_01H)	\
1353 __PMC_EV_ALIAS("SIMD_Int_Psft_Exec",	IAP_EVENT_B3H_02H)	\
1354 __PMC_EV_ALIAS("SIMD_Int_Sat_Exec",	IAP_EVENT_B1H_00H)	\
1355 __PMC_EV_ALIAS("SIMD_Int_Upck_Exec",	IAP_EVENT_B3H_08H)	\
1356 __PMC_EV_ALIAS("SMC_Detected",		IAP_EVENT_C3H_00H)	\
1357 __PMC_EV_ALIAS("SSE_NTStores_Miss",	IAP_EVENT_4BH_03H)	\
1358 __PMC_EV_ALIAS("SSE_NTStores_Ret",	IAP_EVENT_07H_03H)	\
1359 __PMC_EV_ALIAS("SSE_PrefNta_Miss",	IAP_EVENT_4BH_00H)	\
1360 __PMC_EV_ALIAS("SSE_PrefNta_Ret",	IAP_EVENT_07H_00H)	\
1361 __PMC_EV_ALIAS("SSE_PrefT1_Miss",	IAP_EVENT_4BH_01H)	\
1362 __PMC_EV_ALIAS("SSE_PrefT1_Ret",	IAP_EVENT_07H_01H)	\
1363 __PMC_EV_ALIAS("SSE_PrefT2_Miss",	IAP_EVENT_4BH_02H)	\
1364 __PMC_EV_ALIAS("SSE_PrefT2_Ret",	IAP_EVENT_07H_02H)	\
1365 __PMC_EV_ALIAS("Seg_Reg_Loads",		IAP_EVENT_06H_00H)	\
1366 __PMC_EV_ALIAS("Serial_Execution_Cycles", IAP_EVENT_3CH_02H)	\
1367 __PMC_EV_ALIAS("Thermal_Trip",		IAP_EVENT_3BH_C0H)	\
1368 __PMC_EV_ALIAS("Unfusion",		IAP_EVENT_DBH_00H)	\
1369 __PMC_EV_ALIAS("Unhalted_Core_Cycles",	IAP_EVENT_3CH_00H)	\
1370 __PMC_EV_ALIAS("Uops_Ret",		IAP_EVENT_C2H_00H)
1371 
1372 /*
1373  * Aliases for Core2 PMC events.
1374  */
1375 #define	__PMC_EV_ALIAS_CORE2()						\
1376 __PMC_EV_ALIAS_INTEL_ARCHITECTURAL()					\
1377 __PMC_EV_ALIAS("BACLEARS",		IAP_EVENT_E6H_00H)		\
1378 __PMC_EV_ALIAS("BOGUS_BR",		IAP_EVENT_E4H_00H)		\
1379 __PMC_EV_ALIAS("BR_BAC_MISSP_EXEC",	IAP_EVENT_8AH_00H)		\
1380 __PMC_EV_ALIAS("BR_CALL_EXEC",		IAP_EVENT_92H_00H)		\
1381 __PMC_EV_ALIAS("BR_CALL_MISSP_EXEC",	IAP_EVENT_93H_00H)		\
1382 __PMC_EV_ALIAS("BR_CND_EXEC",		IAP_EVENT_8BH_00H)		\
1383 __PMC_EV_ALIAS("BR_CND_MISSP_EXEC",	IAP_EVENT_8CH_00H)		\
1384 __PMC_EV_ALIAS("BR_IND_CALL_EXEC",	IAP_EVENT_94H_00H)		\
1385 __PMC_EV_ALIAS("BR_IND_EXEC",		IAP_EVENT_8DH_00H)		\
1386 __PMC_EV_ALIAS("BR_IND_MISSP_EXEC",	IAP_EVENT_8EH_00H)		\
1387 __PMC_EV_ALIAS("BR_INST_DECODED",	IAP_EVENT_E0H_00H)		\
1388 __PMC_EV_ALIAS("BR_INST_EXEC",		IAP_EVENT_88H_00H)		\
1389 __PMC_EV_ALIAS("BR_INST_RETIRED.ANY",	IAP_EVENT_C4H_00H)		\
1390 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED", IAP_EVENT_C5H_00H)		\
1391 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_NOT_TAKEN",			\
1392     IAP_EVENT_C4H_02H)							\
1393 __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_TAKEN",				\
1394     IAP_EVENT_C4H_08H)							\
1395 __PMC_EV_ALIAS("BR_INST_RETIRED.PRED_NOT_TAKEN",			\
1396     IAP_EVENT_C4H_01H)							\
1397 __PMC_EV_ALIAS("BR_INST_RETIRED.PRED_TAKEN",				\
1398     IAP_EVENT_C4H_04H)							\
1399 __PMC_EV_ALIAS("BR_INST_RETIRED.TAKEN",	IAP_EVENT_C4H_0CH)		\
1400 __PMC_EV_ALIAS("BR_MISSP_EXEC",		IAP_EVENT_89H_00H)		\
1401 __PMC_EV_ALIAS("BR_RET_BAC_MISSP_EXEC",	IAP_EVENT_91H_00H)		\
1402 __PMC_EV_ALIAS("BR_RET_EXEC",		IAP_EVENT_8FH_00H)		\
1403 __PMC_EV_ALIAS("BR_RET_MISSP_EXEC",	IAP_EVENT_90H_00H)		\
1404 __PMC_EV_ALIAS("BR_TKN_BUBBLE_1",	IAP_EVENT_97H_00H)		\
1405 __PMC_EV_ALIAS("BR_TKN_BUBBLE_2",	IAP_EVENT_98H_00H)		\
1406 __PMC_EV_ALIAS("BUSQ_EMPTY",		IAP_EVENT_7DH)			\
1407 __PMC_EV_ALIAS("BUS_BNR_DRV",		IAP_EVENT_61H)			\
1408 __PMC_EV_ALIAS("BUS_DATA_RCV",		IAP_EVENT_64H)			\
1409 __PMC_EV_ALIAS("BUS_DRDY_CLOCKS",	IAP_EVENT_62H)			\
1410 __PMC_EV_ALIAS("BUS_HITM_DRV",		IAP_EVENT_7BH)			\
1411 __PMC_EV_ALIAS("BUS_HIT_DRV",		IAP_EVENT_7AH)			\
1412 __PMC_EV_ALIAS("BUS_IO_WAIT",		IAP_EVENT_7FH)			\
1413 __PMC_EV_ALIAS("BUS_LOCK_CLOCKS",	IAP_EVENT_63H)			\
1414 __PMC_EV_ALIAS("BUS_REQUEST_OUTSTANDING",				\
1415     IAP_EVENT_60H)							\
1416 __PMC_EV_ALIAS("BUS_TRANS_ANY",		IAP_EVENT_70H)			\
1417 __PMC_EV_ALIAS("BUS_TRANS_BRD",		IAP_EVENT_65H)			\
1418 __PMC_EV_ALIAS("BUS_TRANS_BURST",	IAP_EVENT_6EH)			\
1419 __PMC_EV_ALIAS("BUS_TRANS_DEF",		IAP_EVENT_6DH)			\
1420 __PMC_EV_ALIAS("BUS_TRANS_IFETCH",	IAP_EVENT_68H)			\
1421 __PMC_EV_ALIAS("BUS_TRANS_INVAL",	IAP_EVENT_69H)			\
1422 __PMC_EV_ALIAS("BUS_TRANS_IO",		IAP_EVENT_6CH)			\
1423 __PMC_EV_ALIAS("BUS_TRANS_MEM",		IAP_EVENT_6FH)			\
1424 __PMC_EV_ALIAS("BUS_TRANS_P",		IAP_EVENT_6BH)			\
1425 __PMC_EV_ALIAS("BUS_TRANS_PWR",		IAP_EVENT_6AH)			\
1426 __PMC_EV_ALIAS("BUS_TRANS_RFO",		IAP_EVENT_66H)			\
1427 __PMC_EV_ALIAS("BUS_TRANS_WB",		IAP_EVENT_67H)			\
1428 __PMC_EV_ALIAS("CMP_SNOOP",		IAP_EVENT_78H)			\
1429 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.BUS",	IAP_EVENT_3CH_01H)		\
1430 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.CORE_P",				\
1431     IAP_EVENT_3CH_00H)							\
1432 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.NO_OTHER",				\
1433     IAP_EVENT_3CH_02H)							\
1434 __PMC_EV_ALIAS("CYCLES_DIV_BUSY",	IAP_EVENT_14H_00H)		\
1435 __PMC_EV_ALIAS("CYCLES_INT_MASKED",	IAP_EVENT_C6H_01H)		\
1436 __PMC_EV_ALIAS("CYCLES_INT_PENDING_AND_MASKED",				\
1437     IAP_EVENT_C6H_02H)							\
1438 __PMC_EV_ALIAS("CYCLES_L1I_MEM_STALLED", IAP_EVENT_86H_00H)		\
1439 __PMC_EV_ALIAS("DELAYED_BYPASS.FP",	IAP_EVENT_19H_00H)		\
1440 __PMC_EV_ALIAS("DELAYED_BYPASS.LOAD",	IAP_EVENT_19H_01H)		\
1441 __PMC_EV_ALIAS("DELAYED_BYPASS.SIMD",	IAP_EVENT_19H_02H)		\
1442 __PMC_EV_ALIAS("DIV",			IAP_EVENT_13H_00H)		\
1443 __PMC_EV_ALIAS("DTLB_MISSES.ANY",	IAP_EVENT_08H_01H)		\
1444 __PMC_EV_ALIAS("DTLB_MISSES.L0_MISS_LD", IAP_EVENT_08H_04H)		\
1445 __PMC_EV_ALIAS("DTLB_MISSES.MISS_LD",	IAP_EVENT_08H_02H)		\
1446 __PMC_EV_ALIAS("DTLB_MISSES.MISS_ST",	IAP_EVENT_08H_08H)		\
1447 __PMC_EV_ALIAS("EIST_TRANS",		IAP_EVENT_3AH_00H)		\
1448 __PMC_EV_ALIAS("ESP.ADDITIONS",		IAP_EVENT_ABH_02H)		\
1449 __PMC_EV_ALIAS("ESP.SYNCH",		IAP_EVENT_ABH_01H)		\
1450 __PMC_EV_ALIAS("EXT_SNOOP",		IAP_EVENT_77H)			\
1451 __PMC_EV_ALIAS("FP_ASSIST",		IAP_EVENT_11H_00H)		\
1452 __PMC_EV_ALIAS("FP_COMP_OPS_EXE",	IAP_EVENT_10H_00H)		\
1453 __PMC_EV_ALIAS("FP_MMX_TRANS_TO_FP",	IAP_EVENT_CCH_02H)		\
1454 __PMC_EV_ALIAS("FP_MMX_TRANS_TO_MMX",	IAP_EVENT_CCH_01H)		\
1455 __PMC_EV_ALIAS("HW_INT_RCV",		IAP_EVENT_C8H_00H)		\
1456 __PMC_EV_ALIAS("IDLE_DURING_DIV",	IAP_EVENT_18H_00H)		\
1457 __PMC_EV_ALIAS("ILD_STALL",		IAP_EVENT_87H_00H)		\
1458 __PMC_EV_ALIAS("INST_QUEUE.FULL",	IAP_EVENT_83H_02H)		\
1459 __PMC_EV_ALIAS("INST_RETIRED.ANY_P",	IAP_EVENT_C0H_00H)		\
1460 __PMC_EV_ALIAS("INST_RETIRED.LOADS",	IAP_EVENT_C0H_01H)		\
1461 __PMC_EV_ALIAS("INST_RETIRED.OTHER",	IAP_EVENT_C0H_04H)		\
1462 __PMC_EV_ALIAS("INST_RETIRED.STORES",	IAP_EVENT_C0H_02H)		\
1463 __PMC_EV_ALIAS("INST_RETIRED.VM_H",	IAP_EVENT_C0H_08H)		\
1464 __PMC_EV_ALIAS("ITLB.FLUSH",		IAP_EVENT_82H_40H)		\
1465 __PMC_EV_ALIAS("ITLB.LARGE_MISS",	IAP_EVENT_82H_10H)		\
1466 __PMC_EV_ALIAS("ITLB.MISSES",		IAP_EVENT_82H_12H)		\
1467 __PMC_EV_ALIAS("ITLB.SMALL_MISS",	IAP_EVENT_82H_02H)		\
1468 __PMC_EV_ALIAS("ITLB_MISS_RETIRED",	IAP_EVENT_C9H_00H)		\
1469 __PMC_EV_ALIAS("L1D_ALL_CACHE_REF",	IAP_EVENT_43H_02H)		\
1470 __PMC_EV_ALIAS("L1D_ALL_REF",		IAP_EVENT_43H_01H)		\
1471 __PMC_EV_ALIAS("L1D_CACHE_LD",		IAP_EVENT_40H)			\
1472 __PMC_EV_ALIAS("L1D_CACHE_LOCK",	IAP_EVENT_42H)			\
1473 __PMC_EV_ALIAS("L1D_CACHE_LOCK_DURATION", IAP_EVENT_42H_10H)		\
1474 __PMC_EV_ALIAS("L1D_CACHE_ST",		IAP_EVENT_41H)			\
1475 __PMC_EV_ALIAS("L1D_M_EVICT",		IAP_EVENT_47H_00H)		\
1476 __PMC_EV_ALIAS("L1D_M_REPL",		IAP_EVENT_46H_00H)		\
1477 __PMC_EV_ALIAS("L1D_PEND_MISS",		IAP_EVENT_48H_00H)		\
1478 __PMC_EV_ALIAS("L1D_PREFETCH.REQUESTS",	IAP_EVENT_4EH_10H)		\
1479 __PMC_EV_ALIAS("L1D_REPL",		IAP_EVENT_45H_0FH)		\
1480 __PMC_EV_ALIAS("L1D_SPLIT.LOADS",	IAP_EVENT_49H_01H)		\
1481 __PMC_EV_ALIAS("L1D_SPLIT.STORES",	IAP_EVENT_49H_02H)		\
1482 __PMC_EV_ALIAS("L1I_MISSES",		IAP_EVENT_81H_00H)		\
1483 __PMC_EV_ALIAS("L1I_READS",		IAP_EVENT_80H_00H)		\
1484 __PMC_EV_ALIAS("L2_ADS",		IAP_EVENT_21H)			\
1485 __PMC_EV_ALIAS("L2_DBUS_BUSY_RD",	IAP_EVENT_23H)			\
1486 __PMC_EV_ALIAS("L2_IFETCH",		IAP_EVENT_28H)			\
1487 __PMC_EV_ALIAS("L2_LD",			IAP_EVENT_29H)			\
1488 __PMC_EV_ALIAS("L2_LINES_IN",		IAP_EVENT_24H)			\
1489 __PMC_EV_ALIAS("L2_LINES_OUT",		IAP_EVENT_26H)			\
1490 __PMC_EV_ALIAS("L2_LOCK",		IAP_EVENT_2BH)			\
1491 __PMC_EV_ALIAS("L2_M_LINES_IN",		IAP_EVENT_25H)			\
1492 __PMC_EV_ALIAS("L2_M_LINES_OUT",	IAP_EVENT_27H)			\
1493 __PMC_EV_ALIAS("L2_NO_REQ",		IAP_EVENT_32H)			\
1494 __PMC_EV_ALIAS("L2_REJECT_BUSQ",	IAP_EVENT_30H)			\
1495 __PMC_EV_ALIAS("L2_RQSTS",		IAP_EVENT_2EH)			\
1496 __PMC_EV_ALIAS("L2_RQSTS.SELF.DEMAND.I_STATE",				\
1497     IAP_EVENT_2EH_41H)							\
1498 __PMC_EV_ALIAS("L2_RQSTS.SELF.DEMAND.MESI",				\
1499     IAP_EVENT_2EH_4FH)							\
1500 __PMC_EV_ALIAS("L2_ST",			IAP_EVENT_2AH)			\
1501 __PMC_EV_ALIAS("LOAD_BLOCK.L1D",	IAP_EVENT_03H_20H)		\
1502 __PMC_EV_ALIAS("LOAD_BLOCK.OVERLAP_STORE",				\
1503     IAP_EVENT_03H_08H)							\
1504 __PMC_EV_ALIAS("LOAD_BLOCK.STA",	IAP_EVENT_03H_02H)		\
1505 __PMC_EV_ALIAS("LOAD_BLOCK.STD",	IAP_EVENT_03H_04H)		\
1506 __PMC_EV_ALIAS("LOAD_BLOCK.UNTIL_RETIRE", IAP_EVENT_03H_10H)		\
1507 __PMC_EV_ALIAS("LOAD_HIT_PRE",		IAP_EVENT_4CH_00H)		\
1508 __PMC_EV_ALIAS("MACHINE_NUKES.MEM_ORDER", IAP_EVENT_C3H_04H)		\
1509 __PMC_EV_ALIAS("MACHINE_NUKES.SMC",	IAP_EVENT_C3H_01H)		\
1510 __PMC_EV_ALIAS("MACRO_INSTS.CISC_DECODED", IAP_EVENT_AAH_08H)		\
1511 __PMC_EV_ALIAS("MACRO_INSTS.DECODED",	IAP_EVENT_AAH_01H)		\
1512 __PMC_EV_ALIAS("MEMORY_DISAMBIGUATION.RESET",				\
1513     IAP_EVENT_09H_01H)							\
1514 __PMC_EV_ALIAS("MEMORY_DISAMBIGUATION.SUCCESS",				\
1515     IAP_EVENT_09H_02H)							\
1516 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.DTLB_MISS",				\
1517     IAP_EVENT_CBH_10H)							\
1518 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L1D_LINE_MISS",			\
1519     IAP_EVENT_CBH_02H)							\
1520 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L1D_MISS",				\
1521     IAP_EVENT_CBH_01H)							\
1522 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_LINE_MISS",				\
1523     IAP_EVENT_CBH_08H)							\
1524 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_MISS",				\
1525     IAP_EVENT_CBH_04H)							\
1526 __PMC_EV_ALIAS("MUL",			IAP_EVENT_12H_00H)		\
1527 __PMC_EV_ALIAS("PAGE_WALKS.COUNT",	IAP_EVENT_0CH_01H)		\
1528 __PMC_EV_ALIAS("PAGE_WALKS.CYCLES",	IAP_EVENT_0CH_02H)		\
1529 __PMC_EV_ALIAS("PREF_RQSTS_DN",		IAP_EVENT_F8H_00H)		\
1530 __PMC_EV_ALIAS("PREF_RQSTS_UP",		IAP_EVENT_F0H_00H)		\
1531 __PMC_EV_ALIAS("RAT_STALLS.ANY",	IAP_EVENT_D2H_0FH)		\
1532 __PMC_EV_ALIAS("RAT_STALLS.FLAGS",	IAP_EVENT_D2H_04H)		\
1533 __PMC_EV_ALIAS("RAT_STALLS.FPSW",	IAP_EVENT_D2H_08H)		\
1534 __PMC_EV_ALIAS("RAT_STALLS.OTHER_SERIALIZATION_STALLS",			\
1535     IAP_EVENT_D2H_10H)							\
1536 __PMC_EV_ALIAS("RAT_STALLS.PARTIAL_CYCLES",				\
1537     IAP_EVENT_D2H_02H)							\
1538 __PMC_EV_ALIAS("RAT_STALLS.ROB_READ_PORT",				\
1539     IAP_EVENT_D2H_01H)							\
1540 __PMC_EV_ALIAS("RESOURCE_STALLS.ANY",	IAP_EVENT_DCH_1FH)		\
1541 __PMC_EV_ALIAS("RESOURCE_STALLS.BR_MISS_CLEAR",				\
1542     IAP_EVENT_DCH_10H)							\
1543 __PMC_EV_ALIAS("RESOURCE_STALLS.FPCW",	IAP_EVENT_DCH_08H)		\
1544 __PMC_EV_ALIAS("RESOURCE_STALLS.LD_ST",	IAP_EVENT_DCH_04H)		\
1545 __PMC_EV_ALIAS("RESOURCE_STALLS.ROB_FULL",				\
1546     IAP_EVENT_DCH_01H)							\
1547 __PMC_EV_ALIAS("RESOURCE_STALLS.RS_FULL", IAP_EVENT_DCH_02H)		\
1548 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED",	IAP_EVENT_A0H_00H)		\
1549 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT0", IAP_EVENT_A1H_01H)		\
1550 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT1", IAP_EVENT_A1H_02H)		\
1551 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT2", IAP_EVENT_A1H_04H)		\
1552 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT3", IAP_EVENT_A1H_08H)		\
1553 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT4", IAP_EVENT_A1H_10H)		\
1554 __PMC_EV_ALIAS("RS_UOPS_DISPATCHED.PORT5", IAP_EVENT_A1H_20H)		\
1555 __PMC_EV_ALIAS("SB_DRAIN_CYCLES",	IAP_EVENT_04H_01H)		\
1556 __PMC_EV_ALIAS("SEGMENT_REG_LOADS",	IAP_EVENT_06H_00H)		\
1557 __PMC_EV_ALIAS("SEG_REG_RENAMES.ANY",	IAP_EVENT_D5H_0FH)		\
1558 __PMC_EV_ALIAS("SEG_REG_RENAMES.DS",	IAP_EVENT_D5H_02H)		\
1559 __PMC_EV_ALIAS("SEG_REG_RENAMES.ES",	IAP_EVENT_D5H_01H)		\
1560 __PMC_EV_ALIAS("SEG_REG_RENAMES.FS",	IAP_EVENT_D5H_04H)		\
1561 __PMC_EV_ALIAS("SEG_REG_RENAMES.GS",	IAP_EVENT_D5H_08H)		\
1562 __PMC_EV_ALIAS("SEG_RENAME_STALLS.ANY",	IAP_EVENT_D4H_0FH)		\
1563 __PMC_EV_ALIAS("SEG_RENAME_STALLS.DS",	IAP_EVENT_D4H_02H)		\
1564 __PMC_EV_ALIAS("SEG_RENAME_STALLS.ES",	IAP_EVENT_D4H_01H)		\
1565 __PMC_EV_ALIAS("SEG_RENAME_STALLS.FS",	IAP_EVENT_D4H_04H)		\
1566 __PMC_EV_ALIAS("SEG_RENAME_STALLS.GS",	IAP_EVENT_D4H_08H)		\
1567 __PMC_EV_ALIAS("SIMD_ASSIST",		IAP_EVENT_CDH_00H)		\
1568 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.PACKED_DOUBLE",			\
1569     IAP_EVENT_CAH_04H)							\
1570 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.PACKED_SINGLE",			\
1571     IAP_EVENT_CAH_01H)							\
1572 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.SCALAR_DOUBLE",			\
1573     IAP_EVENT_CAH_08H)							\
1574 __PMC_EV_ALIAS("SIMD_COMP_INST_RETIRED.SCALAR_SINGLE",			\
1575     IAP_EVENT_CAH_02H)							\
1576 __PMC_EV_ALIAS("SIMD_INSTR_RETIRED",	IAP_EVENT_CEH_00H)		\
1577 __PMC_EV_ALIAS("SIMD_INST_RETIRED.ANY",	IAP_EVENT_C7H_1FH)		\
1578 __PMC_EV_ALIAS("SIMD_INST_RETIRED.PACKED_DOUBLE",			\
1579     IAP_EVENT_C7H_04H)							\
1580 __PMC_EV_ALIAS("SIMD_INST_RETIRED.PACKED_SINGLE",			\
1581     IAP_EVENT_C7H_01H)							\
1582 __PMC_EV_ALIAS("SIMD_INST_RETIRED.SCALAR_DOUBLE",			\
1583     IAP_EVENT_C7H_08H)							\
1584 __PMC_EV_ALIAS("SIMD_INST_RETIRED.SCALAR_SINGLE",			\
1585     IAP_EVENT_C7H_02H)							\
1586 __PMC_EV_ALIAS("SIMD_INST_RETIRED.VECTOR",	IAP_EVENT_C7H_10H)	\
1587 __PMC_EV_ALIAS("SIMD_SAT_INSTR_RETIRED",	IAP_EVENT_CFH_00H)	\
1588 __PMC_EV_ALIAS("SIMD_SAT_UOP_EXEC",		IAP_EVENT_B1H_00H)	\
1589 __PMC_EV_ALIAS("SIMD_UOPS_EXEC",		IAP_EVENT_B0H_00H)	\
1590 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.ARITHMETIC",	IAP_EVENT_B3H_20H)	\
1591 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.LOGICAL",	IAP_EVENT_B3H_10H)	\
1592 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.MUL",	IAP_EVENT_B3H_01H)	\
1593 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.PACK",	IAP_EVENT_B3H_04H)	\
1594 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.SHIFT",	IAP_EVENT_B3H_02H)	\
1595 __PMC_EV_ALIAS("SIMD_UOP_TYPE_EXEC.UNPACK",	IAP_EVENT_B3H_08H)	\
1596 __PMC_EV_ALIAS("SNOOP_STALL_DRV",		IAP_EVENT_7EH)		\
1597 __PMC_EV_ALIAS("SSE_PRE_EXEC.L1",		IAP_EVENT_07H_01H)	\
1598 __PMC_EV_ALIAS("SSE_PRE_EXEC.L2",		IAP_EVENT_07H_02H)	\
1599 __PMC_EV_ALIAS("SSE_PRE_EXEC.NTA",		IAP_EVENT_07H_00H)	\
1600 __PMC_EV_ALIAS("SSE_PRE_EXEC.STORES",		IAP_EVENT_07H_03H)	\
1601 __PMC_EV_ALIAS("SSE_PRE_MISS.L1",		IAP_EVENT_4BH_01H)	\
1602 __PMC_EV_ALIAS("SSE_PRE_MISS.L2",		IAP_EVENT_4BH_02H)	\
1603 __PMC_EV_ALIAS("SSE_PRE_MISS.NTA",		IAP_EVENT_4BH_00H)	\
1604 __PMC_EV_ALIAS("STORE_BLOCK.ORDER",		IAP_EVENT_04H_02H)	\
1605 __PMC_EV_ALIAS("STORE_BLOCK.SNOOP",		IAP_EVENT_04H_08H)	\
1606 __PMC_EV_ALIAS("THERMAL_TRIP",			IAP_EVENT_3BH_C0H)	\
1607 __PMC_EV_ALIAS("UOPS_RETIRED.ANY",		IAP_EVENT_C2H_0FH)	\
1608 __PMC_EV_ALIAS("UOPS_RETIRED.FUSED",		IAP_EVENT_C2H_07H)	\
1609 __PMC_EV_ALIAS("UOPS_RETIRED.LD_IND_BR",	IAP_EVENT_C2H_01H)	\
1610 __PMC_EV_ALIAS("UOPS_RETIRED.MACRO_FUSION",	IAP_EVENT_C2H_04H)	\
1611 __PMC_EV_ALIAS("UOPS_RETIRED.NON_FUSED",	IAP_EVENT_C2H_08H)	\
1612 __PMC_EV_ALIAS("UOPS_RETIRED.STD_STA",		IAP_EVENT_C2H_02H)	\
1613 __PMC_EV_ALIAS("X87_OPS_RETIRED.ANY",		IAP_EVENT_C1H_FEH)	\
1614 __PMC_EV_ALIAS("X87_OPS_RETIRED.FXCH",		IAP_EVENT_C1H_01H)
1615 
1616 /*
1617  * Aliases for Core i7 PMC events.
1618  */
1619 #define	__PMC_EV_ALIAS_COREI7()						\
1620 __PMC_EV_ALIAS_INTEL_ARCHITECTURAL()					\
1621 __PMC_EV_ALIAS("SB_FORWARD.ANY",			IAP_EVENT_02H_01H) \
1622 __PMC_EV_ALIAS("LOAD_BLOCK.STD",			IAP_EVENT_03H_01H) \
1623 __PMC_EV_ALIAS("LOAD_BLOCK.ADDRESS_OFFSET",		IAP_EVENT_03H_04H) \
1624 __PMC_EV_ALIAS("SB_DRAIN.CYCLES",			IAP_EVENT_04H_01H) \
1625 __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOAD",			IAP_EVENT_05H_01H) \
1626 __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORE",		IAP_EVENT_05H_02H) \
1627 __PMC_EV_ALIAS("MISALIGN_MEM_REF.ANY",			IAP_EVENT_05H_03H) \
1628 __PMC_EV_ALIAS("STORE_BLOCKS.NOT_STA",			IAP_EVENT_06H_01H) \
1629 __PMC_EV_ALIAS("STORE_BLOCKS.STA",			IAP_EVENT_06H_02H) \
1630 __PMC_EV_ALIAS("STORE_BLOCKS.AT_RET",			IAP_EVENT_06H_04H) \
1631 __PMC_EV_ALIAS("STORE_BLOCKS.L1D_BLOCK",		IAP_EVENT_06H_08H) \
1632 __PMC_EV_ALIAS("STORE_BLOCKS.ANY",			IAP_EVENT_06H_0FH) \
1633 __PMC_EV_ALIAS("PARTIAL_ADDRESS_ALIAS",			IAP_EVENT_07H_01H) \
1634 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.ANY",			IAP_EVENT_08H_01H) \
1635 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED",	IAP_EVENT_08H_02H) \
1636 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT",		IAP_EVENT_08H_10H) \
1637 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDE_MISS",		IAP_EVENT_08H_20H) \
1638 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDP_MISS",		IAP_EVENT_08H_40H) \
1639 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED",	IAP_EVENT_08H_80H) \
1640 __PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.RESET",		IAP_EVENT_09H_01H) \
1641 __PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.SUCCESS",	IAP_EVENT_09H_02H) \
1642 __PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.WATCHDOG",	IAP_EVENT_09H_04H) \
1643 __PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.WATCH_CYCLES",	IAP_EVENT_09H_08H) \
1644 __PMC_EV_ALIAS("MEM_INST_RETIRED.LOADS",		IAP_EVENT_0BH_01H) \
1645 __PMC_EV_ALIAS("MEM_INST_RETIRED.STORES",		IAP_EVENT_0BH_02H) \
1646 __PMC_EV_ALIAS("MEM_STORE_RETIRED.DTLB_MISS",		IAP_EVENT_0CH_01H) \
1647 __PMC_EV_ALIAS("UOPS_ISSUED.ANY",			IAP_EVENT_0EH_01H) \
1648 __PMC_EV_ALIAS("UOPS_ISSUED.FUSED",			IAP_EVENT_0EH_02H) \
1649 __PMC_EV_ALIAS("MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM",	IAP_EVENT_0FH_02H) \
1650 __PMC_EV_ALIAS("MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT", IAP_EVENT_0FH_08H) \
1651 __PMC_EV_ALIAS("MEM_UNCORE_RETIRED.REMOTE_DRAM",	IAP_EVENT_0FH_10H) \
1652 __PMC_EV_ALIAS("MEM_UNCORE_RETIRED.LOCAL_DRAM",		IAP_EVENT_0FH_20H) \
1653 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.X87",			IAP_EVENT_10H_01H) \
1654 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.MMX",			IAP_EVENT_10H_02H) \
1655 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_FP",		IAP_EVENT_10H_04H) \
1656 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE2_INTEGER",		IAP_EVENT_10H_08H) \
1657 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_FP_PACKED",		IAP_EVENT_10H_10H) \
1658 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_FP_SCALAR",		IAP_EVENT_10H_20H) \
1659 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION",	IAP_EVENT_10H_40H) \
1660 __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION",	IAP_EVENT_10H_80H) \
1661 __PMC_EV_ALIAS("SIMD_INT_128.PACKED_MPY",		IAP_EVENT_12H_01H) \
1662 __PMC_EV_ALIAS("SIMD_INT_128.PACKED_SHIFT",		IAP_EVENT_12H_02H) \
1663 __PMC_EV_ALIAS("SIMD_INT_128.PACK",			IAP_EVENT_12H_04H) \
1664 __PMC_EV_ALIAS("SIMD_INT_128.UNPACK",			IAP_EVENT_12H_08H) \
1665 __PMC_EV_ALIAS("SIMD_INT_128.PACKED_LOGICAL",		IAP_EVENT_12H_10H) \
1666 __PMC_EV_ALIAS("SIMD_INT_128.PACKED_ARITH",		IAP_EVENT_12H_20H) \
1667 __PMC_EV_ALIAS("SIMD_INT_128.SHUFFLE_MOVE",		IAP_EVENT_12H_40H) \
1668 __PMC_EV_ALIAS("LOAD_DISPATCH.RS",			IAP_EVENT_13H_01H) \
1669 __PMC_EV_ALIAS("LOAD_DISPATCH.RS_DELAYED",		IAP_EVENT_13H_02H) \
1670 __PMC_EV_ALIAS("LOAD_DISPATCH.MOB",			IAP_EVENT_13H_04H) \
1671 __PMC_EV_ALIAS("LOAD_DISPATCH.ANY",			IAP_EVENT_13H_07H) \
1672 __PMC_EV_ALIAS("ARITH.CYCLES_DIV_BUSY",			IAP_EVENT_14H_01H) \
1673 __PMC_EV_ALIAS("ARITH.MUL",				IAP_EVENT_14H_02H) \
1674 __PMC_EV_ALIAS("INST_QUEUE_WRITES",			IAP_EVENT_17H_01H) \
1675 __PMC_EV_ALIAS("INST_DECODED.DEC0",			IAP_EVENT_18H_01H) \
1676 __PMC_EV_ALIAS("TWO_UOP_INSTS_DECODED",			IAP_EVENT_19H_01H) \
1677 __PMC_EV_ALIAS("HW_INT.RCV",				IAP_EVENT_1DH_01H) \
1678 __PMC_EV_ALIAS("HW_INT.CYCLES_MASKED",			IAP_EVENT_1DH_02H) \
1679 __PMC_EV_ALIAS("HW_INT.CYCLES_PENDING_AND_MASKED",	IAP_EVENT_1DH_04H) \
1680 __PMC_EV_ALIAS("INST_QUEUE_WRITE_CYCLES",		IAP_EVENT_1EH_01H) \
1681 __PMC_EV_ALIAS("L2_RQSTS.LD_HIT",			IAP_EVENT_24H_01H) \
1682 __PMC_EV_ALIAS("L2_RQSTS.LD_MISS",			IAP_EVENT_24H_02H) \
1683 __PMC_EV_ALIAS("L2_RQSTS.LOADS",			IAP_EVENT_24H_03H) \
1684 __PMC_EV_ALIAS("L2_RQSTS.RFO_HIT",			IAP_EVENT_24H_04H) \
1685 __PMC_EV_ALIAS("L2_RQSTS.RFO_MISS",			IAP_EVENT_24H_08H) \
1686 __PMC_EV_ALIAS("L2_RQSTS.RFOS",				IAP_EVENT_24H_0CH) \
1687 __PMC_EV_ALIAS("L2_RQSTS.IFETCH_HIT",			IAP_EVENT_24H_10H) \
1688 __PMC_EV_ALIAS("L2_RQSTS.IFETCH_MISS",			IAP_EVENT_24H_20H) \
1689 __PMC_EV_ALIAS("L2_RQSTS.IFETCHES",			IAP_EVENT_24H_30H) \
1690 __PMC_EV_ALIAS("L2_RQSTS.PREFETCH_HIT",			IAP_EVENT_24H_40H) \
1691 __PMC_EV_ALIAS("L2_RQSTS.PREFETCH_MISS",		IAP_EVENT_24H_80H) \
1692 __PMC_EV_ALIAS("L2_RQSTS.PREFETCHES",			IAP_EVENT_24H_C0H) \
1693 __PMC_EV_ALIAS("L2_RQSTS.MISS",				IAP_EVENT_24H_AAH) \
1694 __PMC_EV_ALIAS("L2_RQSTS.REFERENCES",			IAP_EVENT_24H_FFH) \
1695 __PMC_EV_ALIAS("L2_DATA_RQSTS.DEMAND.I_STATE",		IAP_EVENT_26H_01H) \
1696 __PMC_EV_ALIAS("L2_DATA_RQSTS.DEMAND.S_STATE",		IAP_EVENT_26H_02H) \
1697 __PMC_EV_ALIAS("L2_DATA_RQSTS.DEMAND.E_STATE",		IAP_EVENT_26H_04H) \
1698 __PMC_EV_ALIAS("L2_DATA_RQSTS.DEMAND.M_STATE",		IAP_EVENT_26H_08H) \
1699 __PMC_EV_ALIAS("L2_DATA_RQSTS.DEMAND.MESI",		IAP_EVENT_26H_0FH) \
1700 __PMC_EV_ALIAS("L2_DATA_RQSTS.PREFETCH.I_STATE",	IAP_EVENT_26H_10H) \
1701 __PMC_EV_ALIAS("L2_DATA_RQSTS.PREFETCH.S_STATE",	IAP_EVENT_26H_20H) \
1702 __PMC_EV_ALIAS("L2_DATA_RQSTS.PREFETCH.E_STATE",	IAP_EVENT_26H_40H) \
1703 __PMC_EV_ALIAS("L2_DATA_RQSTS.PREFETCH.M_STATE",	IAP_EVENT_26H_80H) \
1704 __PMC_EV_ALIAS("L2_DATA_RQSTS.PREFETCH.MESI",		IAP_EVENT_26H_F0H) \
1705 __PMC_EV_ALIAS("L2_DATA_RQSTS.ANY",			IAP_EVENT_26H_FFH) \
1706 __PMC_EV_ALIAS("L2_WRITE.RFO.I_STATE",			IAP_EVENT_27H_01H) \
1707 __PMC_EV_ALIAS("L2_WRITE.RFO.S_STATE",			IAP_EVENT_27H_02H) \
1708 __PMC_EV_ALIAS("L2_WRITE.RFO.E_STATE",			IAP_EVENT_27H_04H) \
1709 __PMC_EV_ALIAS("L2_WRITE.RFO.M_STATE",			IAP_EVENT_27H_08H) \
1710 __PMC_EV_ALIAS("L2_WRITE.RFO.HIT",			IAP_EVENT_27H_0EH) \
1711 __PMC_EV_ALIAS("L2_WRITE.RFO.MESI",			IAP_EVENT_27H_0FH) \
1712 __PMC_EV_ALIAS("L2_WRITE.LOCK.I_STATE",			IAP_EVENT_27H_10H) \
1713 __PMC_EV_ALIAS("L2_WRITE.LOCK.S_STATE",			IAP_EVENT_27H_20H) \
1714 __PMC_EV_ALIAS("L2_WRITE.LOCK.E_STATE",			IAP_EVENT_27H_40H) \
1715 __PMC_EV_ALIAS("L2_WRITE.LOCK.M_STATE",			IAP_EVENT_27H_80H) \
1716 __PMC_EV_ALIAS("L2_WRITE.LOCK.HIT",			IAP_EVENT_27H_E0H) \
1717 __PMC_EV_ALIAS("L2_WRITE.LOCK.MESI",			IAP_EVENT_27H_F0H) \
1718 __PMC_EV_ALIAS("L1D_WB_L2.I_STATE",			IAP_EVENT_28H_01H) \
1719 __PMC_EV_ALIAS("L1D_WB_L2.S_STATE",			IAP_EVENT_28H_02H) \
1720 __PMC_EV_ALIAS("L1D_WB_L2.E_STATE",			IAP_EVENT_28H_04H) \
1721 __PMC_EV_ALIAS("L1D_WB_L2.M_STATE",			IAP_EVENT_28H_08H) \
1722 __PMC_EV_ALIAS("L1D_WB_L2.MESI",			IAP_EVENT_28H_0FH) \
1723 __PMC_EV_ALIAS("LONGEST_LAT_CACHE.REFERENCE",		IAP_EVENT_2EH_4FH) \
1724 __PMC_EV_ALIAS("LONGEST_LAT_CACHE.MISS",		IAP_EVENT_2EH_41H) \
1725 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.THREAD_P",		IAP_EVENT_3CH_00H) \
1726 __PMC_EV_ALIAS("CPU_CLK_UNHALTED.REF_P",		IAP_EVENT_3CH_01H) \
1727 __PMC_EV_ALIAS("UOPS_DECODED.DEC0",			IAP_EVENT_3DH_01H) \
1728 __PMC_EV_ALIAS("L1D_CACHE_LD.I_STATE",			IAP_EVENT_40H_01H) \
1729 __PMC_EV_ALIAS("L1D_CACHE_LD.S_STATE",			IAP_EVENT_40H_02H) \
1730 __PMC_EV_ALIAS("L1D_CACHE_LD.E_STATE",			IAP_EVENT_40H_04H) \
1731 __PMC_EV_ALIAS("L1D_CACHE_LD.M_STATE",			IAP_EVENT_40H_08H) \
1732 __PMC_EV_ALIAS("L1D_CACHE_LD.MESI",			IAP_EVENT_40H_0FH) \
1733 __PMC_EV_ALIAS("L1D_CACHE_ST.I_STATE",			IAP_EVENT_41H_01H) \
1734 __PMC_EV_ALIAS("L1D_CACHE_ST.S_STATE",			IAP_EVENT_41H_02H) \
1735 __PMC_EV_ALIAS("L1D_CACHE_ST.E_STATE",			IAP_EVENT_41H_04H) \
1736 __PMC_EV_ALIAS("L1D_CACHE_ST.M_STATE",			IAP_EVENT_41H_08H) \
1737 __PMC_EV_ALIAS("L1D_CACHE_ST.MESI",			IAP_EVENT_41H_0FH) \
1738 __PMC_EV_ALIAS("L1D_CACHE_LOCK.HIT",			IAP_EVENT_42H_01H) \
1739 __PMC_EV_ALIAS("L1D_CACHE_LOCK.S_STATE",		IAP_EVENT_42H_02H) \
1740 __PMC_EV_ALIAS("L1D_CACHE_LOCK.E_STATE",		IAP_EVENT_42H_04H) \
1741 __PMC_EV_ALIAS("L1D_CACHE_LOCK.M_STATE",		IAP_EVENT_42H_08H) \
1742 __PMC_EV_ALIAS("L1D_ALL_REF.ANY",			IAP_EVENT_43H_01H) \
1743 __PMC_EV_ALIAS("L1D_ALL_REF.CACHEABLE",			IAP_EVENT_43H_02H) \
1744 __PMC_EV_ALIAS("L1D_PEND_MISS.LOAD_BUFFERS_FULL",	IAP_EVENT_48H_02H) \
1745 __PMC_EV_ALIAS("DTLB_MISSES.ANY",			IAP_EVENT_49H_01H) \
1746 __PMC_EV_ALIAS("DTLB_MISSES.WALK_COMPLETED",		IAP_EVENT_49H_02H) \
1747 __PMC_EV_ALIAS("DTLB_MISSES.STLB_HIT",			IAP_EVENT_49H_10H) \
1748 __PMC_EV_ALIAS("DTLB_MISSES.PDE_MISS",			IAP_EVENT_49H_20H) \
1749 __PMC_EV_ALIAS("DTLB_MISSES.PDP_MISS",			IAP_EVENT_49H_40H) \
1750 __PMC_EV_ALIAS("DTLB_MISSES.LARGE_WALK_COMPLETED",	IAP_EVENT_49H_80H) \
1751 __PMC_EV_ALIAS("SSE_MEM_EXEC.NTA",			IAP_EVENT_4BH_01H) \
1752 __PMC_EV_ALIAS("SSE_MEM_EXEC.STREAMING_STORES",		IAP_EVENT_4BH_08H) \
1753 __PMC_EV_ALIAS("LOAD_HIT_PRE",				IAP_EVENT_4CH_01H) \
1754 __PMC_EV_ALIAS("SFENCE_CYCLES",				IAP_EVENT_4DH_01H) \
1755 __PMC_EV_ALIAS("L1D_PREFETCH.REQUESTS",			IAP_EVENT_4EH_01H) \
1756 __PMC_EV_ALIAS("L1D_PREFETCH.MISS",			IAP_EVENT_4EH_02H) \
1757 __PMC_EV_ALIAS("L1D_PREFETCH.TRIGGERS",			IAP_EVENT_4EH_04H) \
1758 __PMC_EV_ALIAS("EPT.EPDE_MISS",				IAP_EVENT_4FH_02H) \
1759 __PMC_EV_ALIAS("EPT.EPDPE_HIT",				IAP_EVENT_4FH_04H) \
1760 __PMC_EV_ALIAS("EPT.EPDPE_MISS",			IAP_EVENT_4FH_08H) \
1761 __PMC_EV_ALIAS("L1D.REPL",				IAP_EVENT_51H_01H) \
1762 __PMC_EV_ALIAS("L1D.M_REPL",				IAP_EVENT_51H_02H) \
1763 __PMC_EV_ALIAS("L1D.M_EVICT",				IAP_EVENT_51H_04H) \
1764 __PMC_EV_ALIAS("L1D.M_SNOOP_EVICT",			IAP_EVENT_51H_08H) \
1765 __PMC_EV_ALIAS("L1D_CACHE_PREFETCH_LOCK_FB_HIT",	IAP_EVENT_52H_01H) \
1766 __PMC_EV_ALIAS("L1D_CACHE_LOCK_FB_HIT",			IAP_EVENT_53H_01H) \
1767 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATA", IAP_EVENT_60H_01H) \
1768 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE", IAP_EVENT_60H_02H) \
1769 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO", IAP_EVENT_60H_04H) \
1770 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.ANY.READ",	IAP_EVENT_60H_08H) \
1771 __PMC_EV_ALIAS("CACHE_LOCK_CYCLES.L1D_L2",		IAP_EVENT_63H_01H) \
1772 __PMC_EV_ALIAS("CACHE_LOCK_CYCLES.L1D",			IAP_EVENT_63H_02H) \
1773 __PMC_EV_ALIAS("IO_TRANSACTIONS",			IAP_EVENT_6CH_01H) \
1774 __PMC_EV_ALIAS("L1I.HITS",				IAP_EVENT_80H_01H) \
1775 __PMC_EV_ALIAS("L1I.MISSES",				IAP_EVENT_80H_02H) \
1776 __PMC_EV_ALIAS("L1I.READS",				IAP_EVENT_80H_03H) \
1777 __PMC_EV_ALIAS("L1I.CYCLES_STALLED",			IAP_EVENT_80H_04H) \
1778 __PMC_EV_ALIAS("IFU_IVC.FULL",				IAP_EVENT_81H_01H) \
1779 __PMC_EV_ALIAS("IFU_IVC.L1I_EVICTION",			IAP_EVENT_81H_02H) \
1780 __PMC_EV_ALIAS("LARGE_ITLB.HIT",			IAP_EVENT_82H_01H) \
1781 __PMC_EV_ALIAS("L1I_OPPORTUNISTIC_HITS",		IAP_EVENT_83H_01H) \
1782 __PMC_EV_ALIAS("ITLB_MISSES.ANY",			IAP_EVENT_85H_01H) \
1783 __PMC_EV_ALIAS("ITLB_MISSES.WALK_COMPLETED",		IAP_EVENT_85H_02H) \
1784 __PMC_EV_ALIAS("ITLB_MISSES.WALK_CYCLES",		IAP_EVENT_85H_04H) \
1785 __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT",			IAP_EVENT_85H_10H) \
1786 __PMC_EV_ALIAS("ITLB_MISSES.PDE_MISS",			IAP_EVENT_85H_20H) \
1787 __PMC_EV_ALIAS("ITLB_MISSES.PDP_MISS",			IAP_EVENT_85H_40H) \
1788 __PMC_EV_ALIAS("ITLB_MISSES.LARGE_WALK_COMPLETED",	IAP_EVENT_85H_80H) \
1789 __PMC_EV_ALIAS("ILD_STALL.LCP",				IAP_EVENT_87H_01H) \
1790 __PMC_EV_ALIAS("ILD_STALL.MRU",				IAP_EVENT_87H_02H) \
1791 __PMC_EV_ALIAS("ILD_STALL.IQ_FULL",			IAP_EVENT_87H_04H) \
1792 __PMC_EV_ALIAS("ILD_STALL.REGEN",			IAP_EVENT_87H_08H) \
1793 __PMC_EV_ALIAS("ILD_STALL.ANY",				IAP_EVENT_87H_0FH) \
1794 __PMC_EV_ALIAS("BR_INST_EXEC.COND",			IAP_EVENT_88H_01H) \
1795 __PMC_EV_ALIAS("BR_INST_EXEC.DIRECT",			IAP_EVENT_88H_02H) \
1796 __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NON_CALL",	IAP_EVENT_88H_04H) \
1797 __PMC_EV_ALIAS("BR_INST_EXEC.NON_CALLS",		IAP_EVENT_88H_07H) \
1798 __PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR",		IAP_EVENT_88H_08H) \
1799 __PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL",		IAP_EVENT_88H_10H) \
1800 __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL",	IAP_EVENT_88H_20H) \
1801 __PMC_EV_ALIAS("BR_INST_EXEC.NEAR_CALLS",		IAP_EVENT_88H_30H) \
1802 __PMC_EV_ALIAS("BR_INST_EXEC.TAKEN",			IAP_EVENT_88H_40H) \
1803 __PMC_EV_ALIAS("BR_INST_EXEC.ANY",			IAP_EVENT_7FH)	\
1804 __PMC_EV_ALIAS("BR_MISP_EXEC.COND",			IAP_EVENT_89H_01H) \
1805 __PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT",			IAP_EVENT_89H_02H) \
1806 __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NON_CALL",	IAP_EVENT_89H_04H) \
1807 __PMC_EV_ALIAS("BR_MISP_EXEC.NON_CALLS",		IAP_EVENT_89H_07H) \
1808 __PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR",		IAP_EVENT_89H_08H) \
1809 __PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL",		IAP_EVENT_89H_10H) \
1810 __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL",	IAP_EVENT_89H_20H) \
1811 __PMC_EV_ALIAS("BR_MISP_EXEC.NEAR_CALLS",		IAP_EVENT_89H_30H) \
1812 __PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN",			IAP_EVENT_89H_40H) \
1813 __PMC_EV_ALIAS("BR_MISP_EXEC.ANY",			IAP_EVENT_89H_7FH) \
1814 __PMC_EV_ALIAS("RESOURCE_STALLS.ANY",			IAP_EVENT_A2H_01H) \
1815 __PMC_EV_ALIAS("RESOURCE_STALLS.LOAD",			IAP_EVENT_A2H_02H) \
1816 __PMC_EV_ALIAS("RESOURCE_STALLS.RS_FULL",		IAP_EVENT_A2H_04H) \
1817 __PMC_EV_ALIAS("RESOURCE_STALLS.STORE",			IAP_EVENT_A2H_08H) \
1818 __PMC_EV_ALIAS("RESOURCE_STALLS.ROB_FULL",		IAP_EVENT_A2H_10H) \
1819 __PMC_EV_ALIAS("RESOURCE_STALLS.FPCW",			IAP_EVENT_A2H_20H) \
1820 __PMC_EV_ALIAS("RESOURCE_STALLS.MXCSR",			IAP_EVENT_A2H_40H) \
1821 __PMC_EV_ALIAS("RESOURCE_STALLS.OTHER",			IAP_EVENT_A2H_80H) \
1822 __PMC_EV_ALIAS("MACRO_INSTS.FUSIONS_DECODED",		IAP_EVENT_A6H_01H) \
1823 __PMC_EV_ALIAS("BACLEAR_FORCE_IQ",			IAP_EVENT_A7H_01H) \
1824 __PMC_EV_ALIAS("LSD.UOPS",				IAP_EVENT_A8H_01H) \
1825 __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND.READ_DATA",	IAP_EVENT_B0H_01H) \
1826 __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND.READ_CODE",	IAP_EVENT_B0H_02H) \
1827 __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND.RFO",		IAP_EVENT_B0H_04H) \
1828 __PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY.READ",		IAP_EVENT_B0H_08H) \
1829 __PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY.RFO",		IAP_EVENT_80H_10H) \
1830 __PMC_EV_ALIAS("OFFCORE_REQUESTS.UNCACHED_MEM",		IAP_EVENT_B0H_20H) \
1831 __PMC_EV_ALIAS("OFFCORE_REQUESTS.L1D_WRITEBACK",	IAP_EVENT_B0H_40H) \
1832 __PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY",			IAP_EVENT_B0H_80H) \
1833 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT0",			IAP_EVENT_B1H_01H) \
1834 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT1",			IAP_EVENT_B1H_02H) \
1835 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT2_CORE",		IAP_EVENT_B1H_04H) \
1836 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT3_CORE",		IAP_EVENT_B1H_08H) \
1837 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT4_CORE",		IAP_EVENT_B1H_10H) \
1838 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT5",			IAP_EVENT_B1H_20H) \
1839 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT015",			IAP_EVENT_B1H_40H) \
1840 __PMC_EV_ALIAS("UOPS_EXECUTED.PORT234",			IAP_EVENT_B1H_80H) \
1841 __PMC_EV_ALIAS("OFFCORE_REQUESTS_SQ_FULL",		IAP_EVENT_B2H_01H) \
1842 __PMC_EV_ALIAS("SNOOPQ_REQUESTS_OUTSTANDING.DATA",	IAP_EVENT_B3H_01H) \
1843 __PMC_EV_ALIAS("SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE", IAP_EVENT_B3H_02H) \
1844 __PMC_EV_ALIAS("SNOOPQ_REQUESTS_OUTSTANDING.CODE",	IAP_EVENT_B3H_04H) \
1845 __PMC_EV_ALIAS("OOF_CORE_RESPONSE_0",			IAP_EVENT_B7H_01H) \
1846 __PMC_EV_ALIAS("SNOOP_RESPONSE.HIT",			IAP_EVENT_B8H_01H) \
1847 __PMC_EV_ALIAS("SNOOP_RESPONSE.HITE",			IAP_EVENT_B8H_02H) \
1848 __PMC_EV_ALIAS("SNOOP_RESPONSE.HITM",			IAP_EVENT_B8H_04H) \
1849 __PMC_EV_ALIAS("PIC_ACCESSES.TPR_READS",		IAP_EVENT_BAH_01H) \
1850 __PMC_EV_ALIAS("PIC_ACCESSES.TPR_WRITES",		IAP_EVENT_BAH_02H) \
1851 __PMC_EV_ALIAS("INST_RETIRED.ANY_P",			IAP_EVENT_C0H_01H) \
1852 __PMC_EV_ALIAS("INST_RETIRED.X87",			IAP_EVENT_C0H_02H) \
1853 __PMC_EV_ALIAS("UOPS_RETIRED.ANY",			IAP_EVENT_C2H_01H) \
1854 __PMC_EV_ALIAS("UOPS_RETIRED.RETIRE_SLOTS",		IAP_EVENT_C2H_02H) \
1855 __PMC_EV_ALIAS("UOPS_RETIRED.MACRO_FUSED",		IAP_EVENT_C2H_04H) \
1856 __PMC_EV_ALIAS("MACHINE_CLEARS.CYCLES",			IAP_EVENT_C3H_01H) \
1857 __PMC_EV_ALIAS("MACHINE_CLEARS.MEM_ORDER",		IAP_EVENT_C3H_02H) \
1858 __PMC_EV_ALIAS("MACHINE_CLEARS.SMC",			IAP_EVENT_C3H_04H) \
1859 __PMC_EV_ALIAS("MACHINE_CLEARS.FUSION_ASSIST",		IAP_EVENT_C3H_10H) \
1860 __PMC_EV_ALIAS("BR_INST_RETIRED.ALL_BRANCHES",		IAP_EVENT_C4H_00H) \
1861 __PMC_EV_ALIAS("BR_INST_RETIRED.CONDITIONAL",		IAP_EVENT_C4H_01H) \
1862 __PMC_EV_ALIAS("BR_INST_RETIRED.NEAR_CALL",		IAP_EVENT_C4H_02H) \
1863 __PMC_EV_ALIAS("BR_INST_RETIRED.ALL_BRANCHES",		IAP_EVENT_C4H_04H) \
1864 __PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES",		IAP_EVENT_C5H_00H) \
1865 __PMC_EV_ALIAS("BR_MISP_RETIRED.NEAR_CALL",		IAP_EVENT_C5H_02H) \
1866 __PMC_EV_ALIAS("SSEX_UOPS_RETIRED.PACKED_SINGLE",	IAP_EVENT_C7H_01H) \
1867 __PMC_EV_ALIAS("SSEX_UOPS_RETIRED.SCALAR_SINGLE",	IAP_EVENT_C7H_02H) \
1868 __PMC_EV_ALIAS("SSEX_UOPS_RETIRED.PACKED_DOUBLE",	IAP_EVENT_C7H_04H) \
1869 __PMC_EV_ALIAS("SSEX_UOPS_RETIRED.SCALAR_DOUBLE",	IAP_EVENT_C7H_08H) \
1870 __PMC_EV_ALIAS("SSEX_UOPS_RETIRED.VECTOR_INTEGER",	IAP_EVENT_C7H_10H) \
1871 __PMC_EV_ALIAS("ITLB_MISS_RETIRED",			IAP_EVENT_C8H_20H) \
1872 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L1D_HIT",		IAP_EVENT_CBH_01H) \
1873 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.L2_HIT",		IAP_EVENT_CBH_02H) \
1874 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.LLC_UNSHARED_HIT",	IAP_EVENT_CBH_04H) \
1875 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITM", IAP_EVENT_CBH_08H) \
1876 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.LLC_MISS",		IAP_EVENT_CBH_10H) \
1877 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.HIT_LFB",		IAP_EVENT_CBH_40H) \
1878 __PMC_EV_ALIAS("MEM_LOAD_RETIRED.DTLB_MISS",		IAP_EVENT_CBH_80H) \
1879 __PMC_EV_ALIAS("FP_MMX_TRANS.TO_FP",			IAP_EVENT_CCH_01H) \
1880 __PMC_EV_ALIAS("FP_MMX_TRANS.TO_MMX",			IAP_EVENT_CCH_02H) \
1881 __PMC_EV_ALIAS("FP_MMX_TRANS.ANY",			IAP_EVENT_CCH_03H) \
1882 __PMC_EV_ALIAS("MACRO_INSTS.DECODED",			IAP_EVENT_D0H_01H) \
1883 __PMC_EV_ALIAS("UOPS_DECODED.MS",			IAP_EVENT_D1H_02H) \
1884 __PMC_EV_ALIAS("UOPS_DECODED.ESP_FOLDING",		IAP_EVENT_D1H_04H) \
1885 __PMC_EV_ALIAS("UOPS_DECODED.ESP_SYNC",			IAP_EVENT_D1H_08H) \
1886 __PMC_EV_ALIAS("RAT_STALLS.FLAGS",			IAP_EVENT_D2H_01H) \
1887 __PMC_EV_ALIAS("RAT_STALLS.REGISTERS",			IAP_EVENT_D2H_02H) \
1888 __PMC_EV_ALIAS("RAT_STALLS.ROB_READ_PORT",		IAP_EVENT_D2H_04H) \
1889 __PMC_EV_ALIAS("RAT_STALLS.SCOREBOARD",			IAP_EVENT_D2H_08H) \
1890 __PMC_EV_ALIAS("RAT_STALLS.ANY",			IAP_EVENT_D2H_0FH) \
1891 __PMC_EV_ALIAS("SEG_RENAME_STALLS",			IAP_EVENT_D4H_01H) \
1892 __PMC_EV_ALIAS("ES_REG_RENAMES",			IAP_EVENT_D5H_01H) \
1893 __PMC_EV_ALIAS("UOP_UNFUSION",				IAP_EVENT_DBH_01H) \
1894 __PMC_EV_ALIAS("BR_INST_DECODED",			IAP_EVENT_E0H_01H) \
1895 __PMC_EV_ALIAS("BOGUS_BR",				IAP_EVENT_E4H_01H) \
1896 __PMC_EV_ALIAS("BPU_MISSED_CALL_RET",			IAP_EVENT_E5H_01H) \
1897 __PMC_EV_ALIAS("L2_HW_PREFETCH.DATA_TRIGGER",		IAP_EVENT_F3H_04H) \
1898 __PMC_EV_ALIAS("L2_HW_PREFETCH.CODE_TRIGGER",		IAP_EVENT_F3H_08H) \
1899 __PMC_EV_ALIAS("L2_HW_PREFETCH.DCA_TRIGGER",		IAP_EVENT_F3H_10H) \
1900 __PMC_EV_ALIAS("L2_HW_PREFETCH.KICK_START",		IAP_EVENT_F3H_20H) \
1901 __PMC_EV_ALIAS("SQ_MISC.PROMOTION",			IAP_EVENT_F4H_01H) \
1902 __PMC_EV_ALIAS("SQ_MISC.PROMOTION_POST_GO",		IAP_EVENT_F4H_02H) \
1903 __PMC_EV_ALIAS("SQ_MISC.LRU_HINTS",			IAP_EVENT_F4H_04H) \
1904 __PMC_EV_ALIAS("SQ_MISC.FILL_DROPPED",			IAP_EVENT_F4H_08H) \
1905 __PMC_EV_ALIAS("SQ_MISC.SPLIT_LOCK",			IAP_EVENT_F4H_10H) \
1906 __PMC_EV_ALIAS("SQ_FULL_STALL_CYCLES",			IAP_EVENT_F6H_01H) \
1907 __PMC_EV_ALIAS("FP_ASSIST.ALL",				IAP_EVENT_F7H_01H) \
1908 __PMC_EV_ALIAS("FP_ASSIST.OUTPUT",			IAP_EVENT_F7H_02H) \
1909 __PMC_EV_ALIAS("FP_ASSIST.INPUT",			IAP_EVENT_F7H_04H) \
1910 __PMC_EV_ALIAS("SEGMENT_REG_LOADS",			IAP_EVENT_F8H_01H) \
1911 __PMC_EV_ALIAS("SIMD_INT_64.PACKED_MPY",		IAP_EVENT_FDH_01H) \
1912 __PMC_EV_ALIAS("SIMD_INT_64.PACKED_SHIFT",		IAP_EVENT_FDH_02H) \
1913 __PMC_EV_ALIAS("SIMD_INT_64.PACK",			IAP_EVENT_FDH_04H) \
1914 __PMC_EV_ALIAS("SIMD_INT_64.UNPACK",			IAP_EVENT_FDH_08H) \
1915 __PMC_EV_ALIAS("SIMD_INT_64.PACKED_LOGICAL",		IAP_EVENT_FDH_10H) \
1916 __PMC_EV_ALIAS("SIMD_INT_64.PACKED_ARITH",		IAP_EVENT_FDH_20H) \
1917 __PMC_EV_ALIAS("SIMD_INT_64.SHUFFLE_MOVE",		IAP_EVENT_FDH_40H)
1918 
1919 /* timestamp counters. */
1920 #define	__PMC_EV_TSC()							\
1921 	__PMC_EV(TSC, TSC)
1922 
1923 #define	PMC_EV_TSC_FIRST	PMC_EV_TSC_TSC
1924 #define	PMC_EV_TSC_LAST		PMC_EV_TSC_TSC
1925 
1926 /*
1927  * All known PMC events.
1928  *
1929  * PMC event numbers are allocated sparsely to allow new PMC events to
1930  * be added to a PMC class without breaking ABI compatibility.  The
1931  * current allocation scheme is:
1932  *
1933  * START	#EVENTS		DESCRIPTION
1934  * 0		0x1000		Reserved
1935  * 0x1000	0x0001		TSC
1936  * 0x2000	0x0080		AMD K7 events
1937  * 0x2080	0x0100		AMD K8 events
1938  * 0x10000	0x0080		INTEL architectural fixed-function events
1939  * 0x10080	0x0F80		INTEL architectural programmable events
1940  * 0x11000	0x0080		INTEL Pentium 4 events
1941  * 0x11080	0x0080		INTEL Pentium MMX events
1942  * 0x11100	0x0100		INTEL Pentium Pro/P-II/P-III/Pentium-M events
1943  */
1944 #define	__PMC_EVENTS()				\
1945 	__PMC_EV_BLOCK(TSC,	0x01000)	\
1946 	__PMC_EV_TSC()				\
1947 	__PMC_EV_BLOCK(K7,	0x2000)		\
1948 	__PMC_EV_K7()				\
1949 	__PMC_EV_BLOCK(K8,	0x2080)		\
1950 	__PMC_EV_K8()				\
1951 	__PMC_EV_BLOCK(IAF,	0x10000)	\
1952 	__PMC_EV_IAF()				\
1953 	__PMC_EV_BLOCK(IAP,	0x10080)	\
1954 	__PMC_EV_IAP()				\
1955 	__PMC_EV_BLOCK(P4,	0x11000)	\
1956 	__PMC_EV_P4()				\
1957 	__PMC_EV_BLOCK(P5,	0x11080)	\
1958 	__PMC_EV_P5()				\
1959 	__PMC_EV_BLOCK(P6,	0x11100)	\
1960 	__PMC_EV_P6()
1961 
1962 #define	PMC_EVENT_FIRST	PMC_EV_TSC_TSC
1963 #define	PMC_EVENT_LAST	PMC_EV_P6_LAST
1964 
1965 #endif /* _DEV_HWPMC_PMC_EVENTS_H_ */
1966