PAPI 7.1.0.0
Loading...
Searching...
No Matches
pentium4_events.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 IBM Corp.
3 * Contributed by Kevin Corry <kevcorry@us.ibm.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 * pentium4_events.h
24 *
25 * This header contains arrays to describe the Event-Selection-Control
26 * Registers (ESCRs), Counter-Configuration-Control Registers (CCCRs),
27 * and countable events on Pentium4/Xeon/EM64T systems.
28 *
29 * For more details, see:
30 * - IA-32 Intel Architecture Software Developer's Manual,
31 * Volume 3B: System Programming Guide, Part 2
32 * (available at: http://www.intel.com/design/Pentium4/manuals/253669.htm)
33 * - Chapter 18.10: Performance Monitoring Overview
34 * - Chapter 18.13: Performance Monitoring - Pentium4 and Xeon Processors
35 * - Chapter 18.14: Performance Monitoring and Hyper-Threading Technology
36 * - Appendix A.1: Pentium4 and Xeon Processor Performance-Monitoring Events
37 *
38 * This header also contains an array to describe how the Perfmon PMCs map to
39 * the ESCRs and CCCRs.
40 */
41
42#ifndef _PENTIUM4_EVENTS_H_
43#define _PENTIUM4_EVENTS_H_
44
52 {.name = "BPU_ESCR0",
53 .pmc = 0,
54 .allowed_cccrs = { 0, 9, -1, },
55 },
56 {.name = "IS_ESCR0",
57 .pmc = 1,
58 .allowed_cccrs = { 0, 9, -1, },
59 },
60 {.name = "MOB_ESCR0",
61 .pmc = 2,
62 .allowed_cccrs = { 0, 9, -1, },
63 },
64 {.name = "ITLB_ESCR0",
65 .pmc = 3,
66 .allowed_cccrs = { 0, 9, -1, },
67 },
68 {.name = "PMH_ESCR0",
69 .pmc = 4,
70 .allowed_cccrs = { 0, 9, -1, },
71 },
72 {.name = "IX_ESCR0",
73 .pmc = 5,
74 .allowed_cccrs = { 0, 9, -1, },
75 },
76 {.name = "FSB_ESCR0",
77 .pmc = 6,
78 .allowed_cccrs = { 0, 9, -1, },
79 },
80 {.name = "BSU_ESCR0",
81 .pmc = 7,
82 .allowed_cccrs = { 0, 9, -1, },
83 },
84 {.name = "MS_ESCR0",
85 .pmc = 8,
86 .allowed_cccrs = { 2, 11, -1, },
87 },
88 {.name = "TC_ESCR0",
89 .pmc = 9,
90 .allowed_cccrs = { 2, 11, -1, },
91 },
92 {.name = "TBPU_ESCR0",
93 .pmc = 10,
94 .allowed_cccrs = { 2, 11, -1, },
95 },
96 {.name = "FLAME_ESCR0",
97 .pmc = 11,
98 .allowed_cccrs = { 4, 13, -1, },
99 },
100 {.name = "FIRM_ESCR0",
101 .pmc = 12,
102 .allowed_cccrs = { 4, 13, -1, },
103 },
104 {.name = "SAAT_ESCR0",
105 .pmc = 13,
106 .allowed_cccrs = { 4, 13, -1, },
107 },
108 {.name = "U2L_ESCR0",
109 .pmc = 14,
110 .allowed_cccrs = { 4, 13, -1, },
111 },
112 {.name = "DAC_ESCR0",
113 .pmc = 15,
114 .allowed_cccrs = { 4, 13, -1, },
115 },
116 {.name = "IQ_ESCR0",
117 .pmc = 16,
118 .allowed_cccrs = { 6, 8, 15, },
119 },
120 {.name = "ALF_ESCR0",
121 .pmc = 17,
122 .allowed_cccrs = { 6, 8, 15, },
123 },
124 {.name = "RAT_ESCR0",
125 .pmc = 18,
126 .allowed_cccrs = { 6, 8, 15, },
127 },
128 {.name = "SSU_ESCR0",
129 .pmc = 19,
130 .allowed_cccrs = { 6, 8, 15, },
131 },
132 {.name = "CRU_ESCR0",
133 .pmc = 20,
134 .allowed_cccrs = { 6, 8, 15, },
135 },
136 {.name = "CRU_ESCR2",
137 .pmc = 21,
138 .allowed_cccrs = { 6, 8, 15, },
139 },
140 {.name = "CRU_ESCR4",
141 .pmc = 22,
142 .allowed_cccrs = { 6, 8, 15, },
143 },
144 {.name = "BPU_ESCR1",
145 .pmc = 32,
146 .allowed_cccrs = { 1, 10, -1, },
147 },
148 {.name = "IS_ESCR1",
149 .pmc = 33,
150 .allowed_cccrs = { 1, 10, -1, },
151 },
152 {.name = "MOB_ESCR1",
153 .pmc = 34,
154 .allowed_cccrs = { 1, 10, -1, },
155 },
156 {.name = "ITLB_ESCR1",
157 .pmc = 35,
158 .allowed_cccrs = { 1, 10, -1, },
159 },
160 {.name = "PMH_ESCR1",
161 .pmc = 36,
162 .allowed_cccrs = { 1, 10, -1, },
163 },
164 {.name = "IX_ESCR1",
165 .pmc = 37,
166 .allowed_cccrs = { 1, 10, -1, },
167 },
168 {.name = "FSB_ESCR1",
169 .pmc = 38,
170 .allowed_cccrs = { 1, 10, -1, },
171 },
172 {.name = "BSU_ESCR1",
173 .pmc = 39,
174 .allowed_cccrs = { 1, 10, -1, },
175 },
176 {.name = "MS_ESCR1",
177 .pmc = 40,
178 .allowed_cccrs = { 3, 12, -1, },
179 },
180 {.name = "TC_ESCR1",
181 .pmc = 41,
182 .allowed_cccrs = { 3, 12, -1, },
183 },
184 {.name = "TBPU_ESCR1",
185 .pmc = 42,
186 .allowed_cccrs = { 3, 12, -1, },
187 },
188 {.name = "FLAME_ESCR1",
189 .pmc = 43,
190 .allowed_cccrs = { 5, 14, -1, },
191 },
192 {.name = "FIRM_ESCR1",
193 .pmc = 44,
194 .allowed_cccrs = { 5, 14, -1, },
195 },
196 {.name = "SAAT_ESCR1",
197 .pmc = 45,
198 .allowed_cccrs = { 5, 14, -1, },
199 },
200 {.name = "U2L_ESCR1",
201 .pmc = 46,
202 .allowed_cccrs = { 5, 14, -1, },
203 },
204 {.name = "DAC_ESCR1",
205 .pmc = 47,
206 .allowed_cccrs = { 5, 14, -1, },
207 },
208 {.name = "IQ_ESCR1",
209 .pmc = 48,
210 .allowed_cccrs = { 7, 16, 17, },
211 },
212 {.name = "ALF_ESCR1",
213 .pmc = 49,
214 .allowed_cccrs = { 7, 16, 17, },
215 },
216 {.name = "RAT_ESCR1",
217 .pmc = 50,
218 .allowed_cccrs = { 7, 16, 17, },
219 },
220 {.name = "CRU_ESCR1",
221 .pmc = 51,
222 .allowed_cccrs = { 7, 16, 17, },
223 },
224 {.name = "CRU_ESCR3",
225 .pmc = 52,
226 .allowed_cccrs = { 7, 16, 17, },
227 },
228 {.name = "CRU_ESCR5",
229 .pmc = 53,
230 .allowed_cccrs = { 7, 16, 17, },
231 },
232};
233
234#define PENTIUM4_NUM_ESCRS (sizeof(pentium4_escrs)/sizeof(pentium4_escrs[0]))
235
243 {.name = "BPU_CCCR0",
244 .pmc = 23,
245 .pmd = 0,
246 .allowed_escrs = { 0, 1, 2, 3, 4, 5, 6, 7 },
247 },
248 {.name = "BPU_CCCR2",
249 .pmc = 24,
250 .pmd = 9,
251 .allowed_escrs = { 23, 24, 25, 26, 27, 28, 29, 30 },
252 },
253 {.name = "MS_CCCR0",
254 .pmc = 25,
255 .pmd = 2,
256 .allowed_escrs = { 8, 9, 10, -1, -1, -1, -1, -1, },
257 },
258 {.name = "MS_CCCR2",
259 .pmc = 56,
260 .pmd = 11,
261 .allowed_escrs = { 31, 32, 33, -1, -1, -1, -1, -1, },
262 },
263 {.name = "FLAME_CCCR0",
264 .pmc = 27,
265 .pmd = 4,
266 .allowed_escrs = { 11, 12, 13, 14, -1, 15, -1, -1 },
267 },
268 {.name = "FLAME_CCCR2",
269 .pmc = 58,
270 .pmd = 13,
271 .allowed_escrs = { 34, 35, 36, 37, -1, 38, -1, -1 },
272 },
273 {.name = "IQ_CCCR0",
274 .pmc = 29,
275 .pmd = 6,
276 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
277 },
278 {.name = "IQ_CCCR2",
279 .pmc = 60,
280 .pmd = 15,
281 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
282 },
283 {.name = "IQ_CCCR4",
284 .pmc = 31,
285 .pmd = 8,
286 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
287 },
288 {.name = "BPU_CCCR1",
289 .pmc = 24,
290 .pmd = 1,
291 .allowed_escrs = { 0, 1, 2, 3, 4, 5, 6, 7 },
292 },
293 {.name = "BPU_CCCR3",
294 .pmc = 55,
295 .pmd = 10,
296 .allowed_escrs = { 23, 24, 25, 26, 27, 28, 29, 30 },
297 },
298 {.name = "MS_CCCR1",
299 .pmc = 26,
300 .pmd = 3,
301 .allowed_escrs = { 8, 9, 10, -1, -1, -1, -1, -1, },
302 },
303 {.name = "MS_CCCR3",
304 .pmc = 57,
305 .pmd = 12,
306 .allowed_escrs = { 31, 32, 33, -1, -1, -1, -1, -1, },
307 },
308 {.name = "FLAME_CCCR1",
309 .pmc = 28,
310 .pmd = 5,
311 .allowed_escrs = { 11, 12, 13, 14, -1, 15, -1, -1 },
312 },
313 {.name = "FLAME_CCCR3",
314 .pmc = 59,
315 .pmd = 14,
316 .allowed_escrs = { 34, 35, 36, 37, -1, 38, -1, -1 },
317 },
318 {.name = "IQ_CCCR1",
319 .pmc = 30,
320 .pmd = 7,
321 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
322 },
323 {.name = "IQ_CCCR3",
324 .pmc = 61,
325 .pmd = 16,
326 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
327 },
328 {.name = "IQ_CCCR5",
329 .pmc = 62,
330 .pmd = 17,
331 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
332 },
333};
334
335#define PENTIUM4_NUM_CCCRS (sizeof(pentium4_cccrs)/sizeof(pentium4_cccrs[0]))
336
337#define PENTIUM4_NUM_PMCS (PENTIUM4_NUM_CCCRS + PENTIUM4_NUM_ESCRS)
338#define PENTIUM4_NUM_PMDS PENTIUM4_NUM_CCCRS
339#define PENTIUM4_COUNTER_WIDTH 40
340
341
348 {.name = "BPU_ESCR0",
350 .index = 0,
351 },
352 {.name = "IS_ESCR0",
354 .index = 1,
355 },
356 {.name = "MOB_ESCR0",
358 .index = 2,
359 },
360 {.name = "ITLB_ESCR0",
362 .index = 3,
363 },
364 {.name = "PMH_ESCR0",
366 .index = 4,
367 },
368 {.name = "IX_ESCR0",
370 .index = 5,
371 },
372 {.name = "FSB_ESCR0",
374 .index = 6,
375 },
376 {.name = "BSU_ESCR0",
378 .index = 7,
379 },
380 {.name = "MS_ESCR0",
382 .index = 8,
383 },
384 {.name = "TC_ESCR0",
386 .index = 9,
387 },
388 {.name = "TBPU_ESCR0",
390 .index = 10,
391 },
392 {.name = "FLAME_ESCR0",
394 .index = 11,
395 },
396 {.name = "FIRM_ESCR0",
398 .index = 12,
399 },
400 {.name = "SAAT_ESCR0",
402 .index = 13,
403 },
404 {.name = "U2L_ESCR0",
406 .index = 14,
407 },
408 {.name = "DAC_ESCR0",
410 .index = 15,
411 },
412 {.name = "IQ_ESCR0",
414 .index = 16,
415 },
416 {.name = "ALF_ESCR0",
418 .index = 17,
419 },
420 {.name = "RAT_ESCR0",
422 .index = 18,
423 },
424 {.name = "SSU_ESCR0",
426 .index = 19,
427 },
428 {.name = "CRU_ESCR0",
430 .index = 20,
431 },
432 {.name = "CRU_ESCR2",
434 .index = 21,
435 },
436 {.name = "CRU_ESCR4",
438 .index = 22,
439 },
440 {.name = "BPU_CCCR0",
442 .index = 0,
443 },
444 {.name = "BPU_CCCR2",
446 .index = 1,
447 },
448 {.name = "MS_CCCR0",
450 .index = 2,
451 },
452 {.name = "MS_CCCR2",
454 .index = 3,
455 },
456 {.name = "FLAME_CCCR0",
458 .index = 4,
459 },
460 {.name = "FLAME_CCCR2",
462 .index = 5,
463 },
464 {.name = "IQ_CCCR0",
466 .index = 6,
467 },
468 {.name = "IQ_CCCR2",
470 .index = 7,
471 },
472 {.name = "IQ_CCCR4",
474 .index = 8,
475 },
476 {.name = "BPU_ESCR1",
478 .index = 23,
479 },
480 {.name = "IS_ESCR1",
482 .index = 24,
483 },
484 {.name = "MOB_ESCR1",
486 .index = 25,
487 },
488 {.name = "ITLB_ESCR1",
490 .index = 26,
491 },
492 {.name = "PMH_ESCR1",
494 .index = 27,
495 },
496 {.name = "IX_ESCR1",
498 .index = 28,
499 },
500 {.name = "FSB_ESCR1",
502 .index = 29,
503 },
504 {.name = "BSU_ESCR1",
506 .index = 30,
507 },
508 {.name = "MS_ESCR1",
510 .index = 31,
511 },
512 {.name = "TC_ESCR1",
514 .index = 32,
515 },
516 {.name = "TBPU_ESCR1",
518 .index = 33,
519 },
520 {.name = "FLAME_ESCR1",
522 .index = 34,
523 },
524 {.name = "FIRM_ESCR1",
526 .index = 35,
527 },
528 {.name = "SAAT_ESCR1",
530 .index = 36,
531 },
532 {.name = "U2L_ESCR1",
534 .index = 37,
535 },
536 {.name = "DAC_ESCR1",
538 .index = 38,
539 },
540 {.name = "IQ_ESCR1",
542 .index = 39,
543 },
544 {.name = "ALF_ESCR1",
546 .index = 40,
547 },
548 {.name = "RAT_ESCR1",
550 .index = 41,
551 },
552 {.name = "CRU_ESCR1",
554 .index = 42,
555 },
556 {.name = "CRU_ESCR3",
558 .index = 43,
559 },
560 {.name = "CRU_ESCR5",
562 .index = 44,
563 },
564 {.name = "BPU_CCCR1",
566 .index = 9,
567 },
568 {.name = "BPU_CCCR3",
570 .index = 10,
571 },
572 {.name = "MS_CCCR1",
574 .index = 11,
575 },
576 {.name = "MS_CCCR3",
578 .index = 12,
579 },
580 {.name = "FLAME_CCCR1",
582 .index = 13,
583 },
584 {.name = "FLAME_CCCR3",
586 .index = 14,
587 },
588 {.name = "IQ_CCCR1",
590 .index = 15,
591 },
592 {.name = "IQ_CCCR3",
594 .index = 16,
595 },
596 {.name = "IQ_CCCR5",
598 .index = 17,
599 },
600};
601
608
609 /* 0 */
610 {.name = "TC_deliver_mode",
611 .desc = "The duration (in clock cycles) of the operating modes of "
612 "the trace cache and decode engine in the processor package.",
613 .event_select = 0x1,
614 .escr_select = 0x1,
615 .allowed_escrs = { 9, 32 },
616 .event_masks = {
617 {.name = "DD",
618 .desc = "Both logical CPUs in deliver mode.",
619 .bit = 0,
620 },
621 {.name = "DB",
622 .desc = "Logical CPU 0 in deliver mode and "
623 "logical CPU 1 in build mode.",
624 .bit = 1,
625 },
626 {.name = "DI",
627 .desc = "Logical CPU 0 in deliver mode and logical CPU 1 "
628 "either halted, under machine clear condition, or "
629 "transitioning to a long microcode flow.",
630 .bit = 2,
631 },
632 {.name = "BD",
633 .desc = "Logical CPU 0 in build mode and "
634 "logical CPU 1 is in deliver mode.",
635 .bit = 3,
636 },
637 {.name = "BB",
638 .desc = "Both logical CPUs in build mode.",
639 .bit = 4,
640 },
641 {.name = "BI",
642 .desc = "Logical CPU 0 in build mode and logical CPU 1 "
643 "either halted, under machine clear condition, or "
644 "transitioning to a long microcode flow.",
645 .bit = 5,
646 },
647 {.name = "ID",
648 .desc = "Logical CPU 0 either halted, under machine clear "
649 "condition, or transitioning to a long microcode "
650 "flow, and logical CPU 1 in deliver mode.",
651 .bit = 6,
652 },
653 {.name = "IB",
654 .desc = "Logical CPU 0 either halted, under machine clear "
655 "condition, or transitioning to a long microcode "
656 "flow, and logical CPU 1 in build mode.",
657 .bit = 7,
658 },
659 },
660 },
661
662 /* 1 */
663 {.name = "BPU_fetch_request",
664 .desc = "Instruction fetch requests by the Branch Prediction Unit.",
665 .event_select = 0x3,
666 .escr_select = 0x0,
667 .allowed_escrs = { 0, 23 },
668 .event_masks = {
669 {.name = "TCMISS",
670 .desc = "Trace cache lookup miss.",
671 .bit = 0,
672 },
673 },
674 },
675
676 /* 2 */
677 {.name = "ITLB_reference",
678 .desc = "Translations using the Instruction "
679 "Translation Look-Aside Buffer.",
680 .event_select = 0x18,
681 .escr_select = 0x3,
682 .allowed_escrs = { 3, 26 },
683 .event_masks = {
684 {.name = "HIT",
685 .desc = "ITLB hit.",
686 .bit = 0,
687 },
688 {.name = "MISS",
689 .desc = "ITLB miss.",
690 .bit = 1,
691 },
692 {.name = "HIT_UC",
693 .desc = "Uncacheable ITLB hit.",
694 .bit = 2,
695 },
696 },
697 },
698
699 /* 3 */
700 {.name = "memory_cancel",
701 .desc = "Canceling of various types of requests in the "
702 "Data cache Address Control unit (DAC).",
703 .event_select = 0x2,
704 .escr_select = 0x5,
705 .allowed_escrs = { 15, 38 },
706 .event_masks = {
707 {.name = "ST_RB_FULL",
708 .desc = "Replayed because no store request "
709 "buffer is available.",
710 .bit = 2,
711 },
712 {.name = "64K_CONF",
713 .desc = "Conflicts due to 64K aliasing.",
714 .bit = 3,
715 },
716 },
717 },
718
719 /* 4 */
720 {.name = "memory_complete",
721 .desc = "Completions of a load split, store split, "
722 "uncacheable (UC) split, or UC load.",
723 .event_select = 0x8,
724 .escr_select = 0x2,
725 .allowed_escrs = { 13, 36 },
726 .event_masks = {
727 {.name = "LSC",
728 .desc = "Load split completed, excluding UC/WC loads.",
729 .bit = 0,
730 },
731 {.name = "SSC",
732 .desc = "Any split stores completed.",
733 .bit = 1,
734 },
735 },
736 },
737
738 /* 5 */
739 {.name = "load_port_replay",
740 .desc = "Replayed events at the load port.",
741 .event_select = 0x4,
742 .escr_select = 0x2,
743 .allowed_escrs = { 13, 36 },
744 .event_masks = {
745 {.name = "SPLIT_LD",
746 .desc = "Split load.",
747 .bit = 1,
748 },
749 },
750 },
751
752 /* 6 */
753 {.name = "store_port_replay",
754 .desc = "Replayed events at the store port.",
755 .event_select = 0x5,
756 .escr_select = 0x2,
757 .allowed_escrs = { 13, 36 },
758 .event_masks = {
759 {.name = "SPLIT_ST",
760 .desc = "Split store.",
761 .bit = 1,
762 },
763 },
764 },
765
766 /* 7 */
767 {.name = "MOB_load_replay",
768 .desc = "Count of times the memory order buffer (MOB) "
769 "caused a load operation to be replayed.",
770 .event_select = 0x3,
771 .escr_select = 0x2,
772 .allowed_escrs = { 2, 25 },
773 .event_masks = {
774 {.name = "NO_STA",
775 .desc = "Replayed because of unknown store address.",
776 .bit = 1,
777 },
778 {.name = "NO_STD",
779 .desc = "Replayed because of unknown store data.",
780 .bit = 3,
781 },
782 {.name = "PARTIAL_DATA",
783 .desc = "Replayed because of partially overlapped data "
784 "access between the load and store operations.",
785 .bit = 4,
786 },
787 {.name = "UNALGN_ADDR",
788 .desc = "Replayed because the lower 4 bits of the "
789 "linear address do not match between the "
790 "load and store operations.",
791 .bit = 5,
792 },
793 },
794 },
795
796 /* 8 */
797 {.name = "page_walk_type",
798 .desc = "Page walks that the page miss handler (PMH) performs.",
799 .event_select = 0x1,
800 .escr_select = 0x4,
801 .allowed_escrs = { 4, 27 },
802 .event_masks = {
803 {.name = "DTMISS",
804 .desc = "Page walk for a data TLB miss (load or store)",
805 .bit = 0,
806 },
807 {.name = "ITMISS",
808 .desc = "Page walk for an instruction TLB miss",
809 .bit = 1,
810 },
811 },
812 },
813
814 /* 9 */
815 {.name = "BSQ_cache_reference",
816 .desc = "Cache references (2nd or 3rd level caches) as seen by the "
817 "bus unit. Read types include both load and RFO, and write "
818 "types include writebacks and evictions.",
819 .event_select = 0xC,
820 .escr_select = 0x7,
821 .allowed_escrs = { 7, 30 },
822 .event_masks = {
823 {.name = "RD_2ndL_HITS",
824 .desc = "Read 2nd level cache hit Shared.",
825 .bit = 0,
826 },
827 {.name = "RD_2ndL_HITE",
828 .desc = "Read 2nd level cache hit Exclusive.",
829 .bit = 1,
830 },
831 {.name = "RD_2ndL_HITM",
832 .desc = "Read 2nd level cache hit Modified.",
833 .bit = 2,
834 },
835 {.name = "RD_3rdL_HITS",
836 .desc = "Read 3rd level cache hit Shared.",
837 .bit = 3,
838 },
839 {.name = "RD_3rdL_HITE",
840 .desc = "Read 3rd level cache hit Exclusive.",
841 .bit = 4,
842 },
843 {.name = "RD_3rdL_HITM",
844 .desc = "Read 3rd level cache hit Modified.",
845 .bit = 5,
846 },
847 {.name = "RD_2ndL_MISS",
848 .desc = "Read 2nd level cache miss.",
849 .bit = 8,
850 },
851 {.name = "RD_3rdL_MISS",
852 .desc = "Read 3rd level cache miss.",
853 .bit = 9,
854 },
855 {.name = "WR_2ndL_MISS",
856 .desc = "A writeback lookup from DAC misses the 2nd "
857 "level cache (unlikely to happen)",
858 .bit = 10,
859 },
860 },
861 },
862
863 /* 10 */
864 {.name = "IOQ_allocation",
865 .desc = "Count of various types of transactions on the bus. A count "
866 "is generated each time a transaction is allocated into the "
867 "IOQ that matches the specified mask bits. An allocated entry "
868 "can be a sector (64 bytes) or a chunk of 8 bytes. Requests "
869 "are counted once per retry. All 'TYPE_BIT*' event-masks "
870 "together are treated as a single 5-bit value.",
871 .event_select = 0x3,
872 .escr_select = 0x6,
873 .allowed_escrs = { 6, 29 },
874 .event_masks = {
875 {.name = "TYPE_BIT0",
876 .desc = "Bus request type (bit 0).",
877 .bit = 0,
878 },
879 {.name = "TYPE_BIT1",
880 .desc = "Bus request type (bit 1).",
881 .bit = 1,
882 },
883 {.name = "TYPE_BIT2",
884 .desc = "Bus request type (bit 2).",
885 .bit = 2,
886 },
887 {.name = "TYPE_BIT3",
888 .desc = "Bus request type (bit 3).",
889 .bit = 3,
890 },
891 {.name = "TYPE_BIT4",
892 .desc = "Bus request type (bit 4).",
893 .bit = 4,
894 },
895 {.name = "ALL_READ",
896 .desc = "Count read entries.",
897 .bit = 5,
898 },
899 {.name = "ALL_WRITE",
900 .desc = "Count write entries.",
901 .bit = 6,
902 },
903 {.name = "MEM_UC",
904 .desc = "Count UC memory access entries.",
905 .bit = 7,
906 },
907 {.name = "MEM_WC",
908 .desc = "Count WC memory access entries.",
909 .bit = 8,
910 },
911 {.name = "MEM_WT",
912 .desc = "Count write-through (WT) memory access entries.",
913 .bit = 9,
914 },
915 {.name = "MEM_WP",
916 .desc = "Count write-protected (WP) memory access entries.",
917 .bit = 10,
918 },
919 {.name = "MEM_WB",
920 .desc = "Count WB memory access entries.",
921 .bit = 11,
922 },
923 {.name = "OWN",
924 .desc = "Count all store requests driven by processor, as "
925 "opposed to other processor or DMA.",
926 .bit = 13,
927 },
928 {.name = "OTHER",
929 .desc = "Count all requests driven by other "
930 "processors or DMA.",
931 .bit = 14,
932 },
933 {.name = "PREFETCH",
934 .desc = "Include HW and SW prefetch requests in the count.",
935 .bit = 15,
936 },
937 },
938 },
939
940 /* 11 */
941 {.name = "IOQ_active_entries",
942 .desc = "Number of entries (clipped at 15) in the IOQ that are "
943 "active. An allocated entry can be a sector (64 bytes) "
944 "or a chunk of 8 bytes. This event must be programmed in "
945 "conjuction with IOQ_allocation. All 'TYPE_BIT*' event-masks "
946 "together are treated as a single 5-bit value.",
947 .event_select = 0x1A,
948 .escr_select = 0x6,
949 .allowed_escrs = { 29, -1 },
950 .event_masks = {
951 {.name = "TYPE_BIT0",
952 .desc = "Bus request type (bit 0).",
953 .bit = 0,
954 },
955 {.name = "TYPE_BIT1",
956 .desc = "Bus request type (bit 1).",
957 .bit = 1,
958 },
959 {.name = "TYPE_BIT2",
960 .desc = "Bus request type (bit 2).",
961 .bit = 2,
962 },
963 {.name = "TYPE_BIT3",
964 .desc = "Bus request type (bit 3).",
965 .bit = 3,
966 },
967 {.name = "TYPE_BIT4",
968 .desc = "Bus request type (bit 4).",
969 .bit = 4,
970 },
971 {.name = "ALL_READ",
972 .desc = "Count read entries.",
973 .bit = 5,
974 },
975 {.name = "ALL_WRITE",
976 .desc = "Count write entries.",
977 .bit = 6,
978 },
979 {.name = "MEM_UC",
980 .desc = "Count UC memory access entries.",
981 .bit = 7,
982 },
983 {.name = "MEM_WC",
984 .desc = "Count WC memory access entries.",
985 .bit = 8,
986 },
987 {.name = "MEM_WT",
988 .desc = "Count write-through (WT) memory access entries.",
989 .bit = 9,
990 },
991 {.name = "MEM_WP",
992 .desc = "Count write-protected (WP) memory access entries.",
993 .bit = 10,
994 },
995 {.name = "MEM_WB",
996 .desc = "Count WB memory access entries.",
997 .bit = 11,
998 },
999 {.name = "OWN",
1000 .desc = "Count all store requests driven by processor, as "
1001 "opposed to other processor or DMA.",
1002 .bit = 13,
1003 },
1004 {.name = "OTHER",
1005 .desc = "Count all requests driven by other "
1006 "processors or DMA.",
1007 .bit = 14,
1008 },
1009 {.name = "PREFETCH",
1010 .desc = "Include HW and SW prefetch requests in the count.",
1011 .bit = 15,
1012 },
1013 },
1014 },
1015
1016 /* 12 */
1017 {.name = "FSB_data_activity",
1018 .desc = "Count of DRDY or DBSY events that "
1019 "occur on the front side bus.",
1020 .event_select = 0x17,
1021 .escr_select = 0x6,
1022 .allowed_escrs = { 6, 29 },
1023 .event_masks = {
1024 {.name = "DRDY_DRV",
1025 .desc = "Count when this processor drives data onto the bus. "
1026 "Includes writes and implicit writebacks.",
1027 .bit = 0,
1028 },
1029 {.name = "DRDY_OWN",
1030 .desc = "Count when this processor reads data from the bus. "
1031 "Includes loads and some PIC transactions. Count "
1032 "DRDY events that we drive. Count DRDY events sampled "
1033 "that we own.",
1034 .bit = 1,
1035 },
1036 {.name = "DRDY_OTHER",
1037 .desc = "Count when data is on the bus but not being sampled "
1038 "by the processor. It may or may not be driven by "
1039 "this processor.",
1040 .bit = 2,
1041 },
1042 {.name = "DBSY_DRV",
1043 .desc = "Count when this processor reserves the bus for use "
1044 "in the next bus cycle in order to drive data.",
1045 .bit = 3,
1046 },
1047 {.name = "DBSY_OWN",
1048 .desc = "Count when some agent reserves the bus for use in "
1049 "the next bus cycle to drive data that this processor "
1050 "will sample.",
1051 .bit = 4,
1052 },
1053 {.name = "DBSY_OTHER",
1054 .desc = "Count when some agent reserves the bus for use in "
1055 "the next bus cycle to drive data that this processor "
1056 "will NOT sample. It may or may not be being driven "
1057 "by this processor.",
1058 .bit = 5,
1059 },
1060 },
1061 },
1062
1063 /* 13 */
1064 {.name = "BSQ_allocation",
1065 .desc = "Allocations in the Bus Sequence Unit (BSQ). The event mask "
1066 "bits consist of four sub-groups: request type, request "
1067 "length, memory type, and a sub-group consisting mostly of "
1068 "independent bits (5 through 10). Must specify a mask for "
1069 "each sub-group.",
1070 .event_select = 0x5,
1071 .escr_select = 0x7,
1072 .allowed_escrs = { 7, -1 },
1073 .event_masks = {
1074 {.name = "REQ_TYPE0",
1075 .desc = "Along with REQ_TYPE1, request type encodings are: "
1076 "0 - Read (excludes read invalidate), 1 - Read "
1077 "invalidate, 2 - Write (other than writebacks), 3 - "
1078 "Writeback (evicted from cache).",
1079 .bit = 0,
1080 },
1081 {.name = "REQ_TYPE1",
1082 .desc = "Along with REQ_TYPE0, request type encodings are: "
1083 "0 - Read (excludes read invalidate), 1 - Read "
1084 "invalidate, 2 - Write (other than writebacks), 3 - "
1085 "Writeback (evicted from cache).",
1086 .bit = 1,
1087 },
1088 {.name = "REQ_LEN0",
1089 .desc = "Along with REQ_LEN1, request length encodings are: "
1090 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1091 .bit = 2,
1092 },
1093 {.name = "REQ_LEN1",
1094 .desc = "Along with REQ_LEN0, request length encodings are: "
1095 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1096 .bit = 3,
1097 },
1098 {.name = "REQ_IO_TYPE",
1099 .desc = "Request type is input or output.",
1100 .bit = 5,
1101 },
1102 {.name = "REQ_LOCK_TYPE",
1103 .desc = "Request type is bus lock.",
1104 .bit = 6,
1105 },
1106 {.name = "REQ_CACHE_TYPE",
1107 .desc = "Request type is cacheable.",
1108 .bit = 7,
1109 },
1110 {.name = "REQ_SPLIT_TYPE",
1111 .desc = "Request type is a bus 8-byte chunk split across "
1112 "an 8-byte boundary.",
1113 .bit = 8,
1114 },
1115 {.name = "REQ_DEM_TYPE",
1116 .desc = "0: Request type is HW.SW prefetch. "
1117 "1: Request type is a demand.",
1118 .bit = 9,
1119 },
1120 {.name = "REQ_ORD_TYPE",
1121 .desc = "Request is an ordered type.",
1122 .bit = 10,
1123 },
1124 {.name = "MEM_TYPE0",
1125 .desc = "Along with MEM_TYPE1 and MEM_TYPE2, "
1126 "memory type encodings are: 0 - UC, "
1127 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1128 .bit = 11,
1129 },
1130 {.name = "MEM_TYPE1",
1131 .desc = "Along with MEM_TYPE0 and MEM_TYPE2, "
1132 "memory type encodings are: 0 - UC, "
1133 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1134 .bit = 12,
1135 },
1136 {.name = "MEM_TYPE2",
1137 .desc = "Along with MEM_TYPE0 and MEM_TYPE1, "
1138 "memory type encodings are: 0 - UC, "
1139 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1140 .bit = 13,
1141 },
1142 },
1143 },
1144
1145 /* 14 */
1146 {.name = "BSQ_active_entries",
1147 .desc = "Number of BSQ entries (clipped at 15) currently active "
1148 "(valid) which meet the subevent mask criteria during "
1149 "allocation in the BSQ. Active request entries are allocated "
1150 "on the BSQ until de-allocated. De-allocation of an entry "
1151 "does not necessarily imply the request is filled. This "
1152 "event must be programmed in conjunction with BSQ_allocation.",
1153 .event_select = 0x6,
1154 .escr_select = 0x7,
1155 .allowed_escrs = { 30, -1 },
1156 .event_masks = {
1157 {.name = "REQ_TYPE0",
1158 .desc = "Along with REQ_TYPE1, request type encodings are: "
1159 "0 - Read (excludes read invalidate), 1 - Read "
1160 "invalidate, 2 - Write (other than writebacks), 3 - "
1161 "Writeback (evicted from cache).",
1162 .bit = 0,
1163 },
1164 {.name = "REQ_TYPE1",
1165 .desc = "Along with REQ_TYPE0, request type encodings are: "
1166 "0 - Read (excludes read invalidate), 1 - Read "
1167 "invalidate, 2 - Write (other than writebacks), 3 - "
1168 "Writeback (evicted from cache).",
1169 .bit = 1,
1170 },
1171 {.name = "REQ_LEN0",
1172 .desc = "Along with REQ_LEN1, request length encodings are: "
1173 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1174 .bit = 2,
1175 },
1176 {.name = "REQ_LEN1",
1177 .desc = "Along with REQ_LEN0, request length encodings are: "
1178 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1179 .bit = 3,
1180 },
1181 {.name = "REQ_IO_TYPE",
1182 .desc = "Request type is input or output.",
1183 .bit = 5,
1184 },
1185 {.name = "REQ_LOCK_TYPE",
1186 .desc = "Request type is bus lock.",
1187 .bit = 6,
1188 },
1189 {.name = "REQ_CACHE_TYPE",
1190 .desc = "Request type is cacheable.",
1191 .bit = 7,
1192 },
1193 {.name = "REQ_SPLIT_TYPE",
1194 .desc = "Request type is a bus 8-byte chunk split across "
1195 "an 8-byte boundary.",
1196 .bit = 8,
1197 },
1198 {.name = "REQ_DEM_TYPE",
1199 .desc = "0: Request type is HW.SW prefetch. "
1200 "1: Request type is a demand.",
1201 .bit = 9,
1202 },
1203 {.name = "REQ_ORD_TYPE",
1204 .desc = "Request is an ordered type.",
1205 .bit = 10,
1206 },
1207 {.name = "MEM_TYPE0",
1208 .desc = "Along with MEM_TYPE1 and MEM_TYPE2, "
1209 "memory type encodings are: 0 - UC, "
1210 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1211 .bit = 11,
1212 },
1213 {.name = "MEM_TYPE1",
1214 .desc = "Along with MEM_TYPE0 and MEM_TYPE2, "
1215 "memory type encodings are: 0 - UC, "
1216 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1217 .bit = 12,
1218 },
1219 {.name = "MEM_TYPE2",
1220 .desc = "Along with MEM_TYPE0 and MEM_TYPE1, "
1221 "memory type encodings are: 0 - UC, "
1222 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1223 .bit = 13,
1224 },
1225 },
1226 },
1227
1228 /* 15 */
1229 {.name = "SSE_input_assist",
1230 .desc = "Number of times an assist is requested to handle problems "
1231 "with input operands for SSE/SSE2/SSE3 operations; most "
1232 "notably denormal source operands when the DAZ bit isn't set.",
1233 .event_select = 0x34,
1234 .escr_select = 0x1,
1235 .allowed_escrs = { 12, 35 },
1236 .event_masks = {
1237 {.name = "ALL",
1238 .desc = "Count assists for SSE/SSE2/SSE3 uops.",
1239 .bit = 15,
1240 },
1241 },
1242 },
1243
1244 /* 16 */
1245 {.name = "packed_SP_uop",
1246 .desc = "Number of packed single-precision uops.",
1247 .event_select = 0x8,
1248 .escr_select = 0x1,
1249 .allowed_escrs = { 12, 35 },
1250 .event_masks = {
1251 {.name = "ALL",
1252 .desc = "Count all uops operating on packed "
1253 "single-precisions operands.",
1254 .bit = 15,
1255 },
1256 {.name = "TAG0",
1257 .desc = "Tag this event with tag bit 0 "
1258 "for retirement counting with execution_event.",
1259 .bit = 16,
1260 },
1261 {.name = "TAG1",
1262 .desc = "Tag this event with tag bit 1 "
1263 "for retirement counting with execution_event.",
1264 .bit = 17,
1265 },
1266 {.name = "TAG2",
1267 .desc = "Tag this event with tag bit 2 "
1268 "for retirement counting with execution_event.",
1269 .bit = 18,
1270 },
1271 {.name = "TAG3",
1272 .desc = "Tag this event with tag bit 3 "
1273 "for retirement counting with execution_event.",
1274 .bit = 19,
1275 },
1276 },
1277 },
1278
1279 /* 17 */
1280 {.name = "packed_DP_uop",
1281 .desc = "Number of packed double-precision uops.",
1282 .event_select = 0xC,
1283 .escr_select = 0x1,
1284 .allowed_escrs = { 12, 35 },
1285 .event_masks = {
1286 {.name = "ALL",
1287 .desc = "Count all uops operating on packed "
1288 "double-precisions operands.",
1289 .bit = 15,
1290 },
1291 {.name = "TAG0",
1292 .desc = "Tag this event with tag bit 0 "
1293 "for retirement counting with execution_event.",
1294 .bit = 16,
1295 },
1296 {.name = "TAG1",
1297 .desc = "Tag this event with tag bit 1 "
1298 "for retirement counting with execution_event.",
1299 .bit = 17,
1300 },
1301 {.name = "TAG2",
1302 .desc = "Tag this event with tag bit 2 "
1303 "for retirement counting with execution_event.",
1304 .bit = 18,
1305 },
1306 {.name = "TAG3",
1307 .desc = "Tag this event with tag bit 3 "
1308 "for retirement counting with execution_event.",
1309 .bit = 19,
1310 },
1311 },
1312 },
1313
1314 /* 18 */
1315 {.name = "scalar_SP_uop",
1316 .desc = "Number of scalar single-precision uops.",
1317 .event_select = 0xA,
1318 .escr_select = 0x1,
1319 .allowed_escrs = { 12, 35 },
1320 .event_masks = {
1321 {.name = "ALL",
1322 .desc = "Count all uops operating on scalar "
1323 "single-precisions operands.",
1324 .bit = 15,
1325 },
1326 {.name = "TAG0",
1327 .desc = "Tag this event with tag bit 0 "
1328 "for retirement counting with execution_event.",
1329 .bit = 16,
1330 },
1331 {.name = "TAG1",
1332 .desc = "Tag this event with tag bit 1 "
1333 "for retirement counting with execution_event.",
1334 .bit = 17,
1335 },
1336 {.name = "TAG2",
1337 .desc = "Tag this event with tag bit 2 "
1338 "for retirement counting with execution_event.",
1339 .bit = 18,
1340 },
1341 {.name = "TAG3",
1342 .desc = "Tag this event with tag bit 3 "
1343 "for retirement counting with execution_event.",
1344 .bit = 19,
1345 },
1346 },
1347 },
1348
1349 /* 19 */
1350 {.name = "scalar_DP_uop",
1351 .desc = "Number of scalar double-precision uops.",
1352 .event_select = 0xE,
1353 .escr_select = 0x1,
1354 .allowed_escrs = { 12, 35 },
1355 .event_masks = {
1356 {.name = "ALL",
1357 .desc = "Count all uops operating on scalar "
1358 "double-precisions operands.",
1359 .bit = 15,
1360 },
1361 {.name = "TAG0",
1362 .desc = "Tag this event with tag bit 0 "
1363 "for retirement counting with execution_event.",
1364 .bit = 16,
1365 },
1366 {.name = "TAG1",
1367 .desc = "Tag this event with tag bit 1 "
1368 "for retirement counting with execution_event.",
1369 .bit = 17,
1370 },
1371 {.name = "TAG2",
1372 .desc = "Tag this event with tag bit 2 "
1373 "for retirement counting with execution_event.",
1374 .bit = 18,
1375 },
1376 {.name = "TAG3",
1377 .desc = "Tag this event with tag bit 3 "
1378 "for retirement counting with execution_event.",
1379 .bit = 19,
1380 },
1381 },
1382 },
1383
1384 /* 20 */
1385 {.name = "64bit_MMX_uop",
1386 .desc = "Number of MMX instructions which "
1387 "operate on 64-bit SIMD operands.",
1388 .event_select = 0x2,
1389 .escr_select = 0x1,
1390 .allowed_escrs = { 12, 35 },
1391 .event_masks = {
1392 {.name = "ALL",
1393 .desc = "Count all uops operating on 64-bit SIMD integer "
1394 "operands in memory or MMX registers.",
1395 .bit = 15,
1396 },
1397 {.name = "TAG0",
1398 .desc = "Tag this event with tag bit 0 "
1399 "for retirement counting with execution_event.",
1400 .bit = 16,
1401 },
1402 {.name = "TAG1",
1403 .desc = "Tag this event with tag bit 1 "
1404 "for retirement counting with execution_event.",
1405 .bit = 17,
1406 },
1407 {.name = "TAG2",
1408 .desc = "Tag this event with tag bit 2 "
1409 "for retirement counting with execution_event.",
1410 .bit = 18,
1411 },
1412 {.name = "TAG3",
1413 .desc = "Tag this event with tag bit 3 "
1414 "for retirement counting with execution_event.",
1415 .bit = 19,
1416 },
1417 },
1418 },
1419
1420 /* 21 */
1421 {.name = "128bit_MMX_uop",
1422 .desc = "Number of MMX instructions which "
1423 "operate on 128-bit SIMD operands.",
1424 .event_select = 0x1A,
1425 .escr_select = 0x1,
1426 .allowed_escrs = { 12, 35 },
1427 .event_masks = {
1428 {.name = "ALL",
1429 .desc = "Count all uops operating on 128-bit SIMD integer "
1430 "operands in memory or MMX registers.",
1431 .bit = 15,
1432 },
1433 {.name = "TAG0",
1434 .desc = "Tag this event with tag bit 0 "
1435 "for retirement counting with execution_event.",
1436 .bit = 16,
1437 },
1438 {.name = "TAG1",
1439 .desc = "Tag this event with tag bit 1 "
1440 "for retirement counting with execution_event.",
1441 .bit = 17,
1442 },
1443 {.name = "TAG2",
1444 .desc = "Tag this event with tag bit 2 "
1445 "for retirement counting with execution_event.",
1446 .bit = 18,
1447 },
1448 {.name = "TAG3",
1449 .desc = "Tag this event with tag bit 3 "
1450 "for retirement counting with execution_event.",
1451 .bit = 19,
1452 },
1453 },
1454 },
1455
1456 /* 22 */
1457 {.name = "x87_FP_uop",
1458 .desc = "Number of x87 floating-point uops.",
1459 .event_select = 0x4,
1460 .escr_select = 0x1,
1461 .allowed_escrs = { 12, 35 },
1462 .event_masks = {
1463 {.name = "ALL",
1464 .desc = "Count all x87 FP uops.",
1465 .bit = 15,
1466 },
1467 {.name = "TAG0",
1468 .desc = "Tag this event with tag bit 0 "
1469 "for retirement counting with execution_event.",
1470 .bit = 16,
1471 },
1472 {.name = "TAG1",
1473 .desc = "Tag this event with tag bit 1 "
1474 "for retirement counting with execution_event.",
1475 .bit = 17,
1476 },
1477 {.name = "TAG2",
1478 .desc = "Tag this event with tag bit 2 "
1479 "for retirement counting with execution_event.",
1480 .bit = 18,
1481 },
1482 {.name = "TAG3",
1483 .desc = "Tag this event with tag bit 3 "
1484 "for retirement counting with execution_event.",
1485 .bit = 19,
1486 },
1487 },
1488 },
1489
1490 /* 23 */
1491 {.name = "TC_misc",
1492 .desc = "Miscellaneous events detected by the TC. The counter will "
1493 "count twice for each occurrence.",
1494 .event_select = 0x6,
1495 .escr_select = 0x1,
1496 .allowed_escrs = { 9, 32 },
1497 .event_masks = {
1498 {.name = "FLUSH",
1499 .desc = "Number of flushes",
1500 .bit = 4,
1501 },
1502 },
1503 },
1504
1505 /* 24 */
1506 {.name = "global_power_events",
1507 .desc = "Counts the time during which a processor is not stopped.",
1508 .event_select = 0x13,
1509 .escr_select = 0x6,
1510 .allowed_escrs = { 6, 29 },
1511 .event_masks = {
1512 {.name = "RUNNING",
1513 .desc = "The processor is active (includes the "
1514 "handling of HLT STPCLK and throttling.",
1515 .bit = 0,
1516 },
1517 },
1518 },
1519
1520 /* 25 */
1521 {.name = "tc_ms_xfer",
1522 .desc = "Number of times that uop delivery changed from TC to MS ROM.",
1523 .event_select = 0x5,
1524 .escr_select = 0x0,
1525 .allowed_escrs = { 8, 31 },
1526 .event_masks = {
1527 {.name = "CISC",
1528 .desc = "A TC to MS transfer occurred.",
1529 .bit = 0,
1530 },
1531 },
1532 },
1533
1534 /* 26 */
1535 {.name = "uop_queue_writes",
1536 .desc = "Number of valid uops written to the uop queue.",
1537 .event_select = 0x9,
1538 .escr_select = 0x0,
1539 .allowed_escrs = { 8, 31 },
1540 .event_masks = {
1541 {.name = "FROM_TC_BUILD",
1542 .desc = "The uops being written are from TC build mode.",
1543 .bit = 0,
1544 },
1545 {.name = "FROM_TC_DELIVER",
1546 .desc = "The uops being written are from TC deliver mode.",
1547 .bit = 1,
1548 },
1549 {.name = "FROM_ROM",
1550 .desc = "The uops being written are from microcode ROM.",
1551 .bit = 2,
1552 },
1553 },
1554 },
1555
1556 /* 27 */
1557 {.name = "retired_mispred_branch_type",
1558 .desc = "Number of retiring mispredicted branches by type.",
1559 .event_select = 0x5,
1560 .escr_select = 0x2,
1561 .allowed_escrs = { 10, 33 },
1562 .event_masks = {
1563 {.name = "CONDITIONAL",
1564 .desc = "Conditional jumps.",
1565 .bit = 1,
1566 },
1567 {.name = "CALL",
1568 .desc = "Indirect call branches.",
1569 .bit = 2,
1570 },
1571 {.name = "RETURN",
1572 .desc = "Return branches.",
1573 .bit = 3,
1574 },
1575 {.name = "INDIRECT",
1576 .desc = "Returns, indirect calls, or indirect jumps.",
1577 .bit = 4,
1578 },
1579 },
1580 },
1581
1582 /* 28 */
1583 {.name = "retired_branch_type",
1584 .desc = "Number of retiring branches by type.",
1585 .event_select = 0x4,
1586 .escr_select = 0x2,
1587 .allowed_escrs = { 10, 33 },
1588 .event_masks = {
1589 {.name = "CONDITIONAL",
1590 .desc = "Conditional jumps.",
1591 .bit = 1,
1592 },
1593 {.name = "CALL",
1594 .desc = "Indirect call branches.",
1595 .bit = 2,
1596 },
1597 {.name = "RETURN",
1598 .desc = "Return branches.",
1599 .bit = 3,
1600 },
1601 {.name = "INDIRECT",
1602 .desc = "Returns, indirect calls, or indirect jumps.",
1603 .bit = 4,
1604 },
1605 },
1606 },
1607
1608 /* 29 */
1609 {.name = "resource_stall",
1610 .desc = "Occurrences of latency or stalls in the Allocator.",
1611 .event_select = 0x1,
1612 .escr_select = 0x1,
1613 .allowed_escrs = { 17, 40 },
1614 .event_masks = {
1615 {.name = "SBFULL",
1616 .desc = "A stall due to lack of store buffers.",
1617 .bit = 5,
1618 },
1619 },
1620 },
1621
1622 /* 30 */
1623 {.name = "WC_Buffer",
1624 .desc = "Number of Write Combining Buffer operations.",
1625 .event_select = 0x5,
1626 .escr_select = 0x5,
1627 .allowed_escrs = { 15, 38 },
1628 .event_masks = {
1629 {.name = "WCB_EVICTS",
1630 .desc = "WC Buffer evictions of all causes.",
1631 .bit = 0,
1632 },
1633 {.name = "WCB_FULL_EVICT",
1634 .desc = "WC Buffer eviction; no WC buffer is available.",
1635 .bit = 1,
1636 },
1637 },
1638 },
1639
1640 /* 31 */
1641 {.name = "b2b_cycles",
1642 .desc = "Number of back-to-back bus cycles",
1643 .event_select = 0x16,
1644 .escr_select = 0x3,
1645 .allowed_escrs = { 6, 29 },
1646 /* FIXME: Appendix A is missing event-mask info.
1647 .event_masks = {
1648 {.name =
1649 .desc =
1650 .bit =
1651 },
1652 },
1653 */
1654 },
1655 /* 32 */
1656 {.name = "bnr",
1657 .desc = "Number of bus-not-ready conditions.",
1658 .event_select = 0x8,
1659 .escr_select = 0x3,
1660 .allowed_escrs = { 6, 29 },
1661 /* FIXME: Appendix A is missing event-mask info.
1662 .event_masks = {
1663 {.name =
1664 .desc =
1665 .bit =
1666 },
1667 },
1668 */
1669 },
1670
1671 /* 33 */
1672 {.name = "snoop",
1673 .desc = "Number of snoop hit modified bus traffic.",
1674 .event_select = 0x6,
1675 .escr_select = 0x3,
1676 .allowed_escrs = { 6, 29 },
1677 /* FIXME: Appendix A is missing event-mask info.
1678 .event_masks = {
1679 {.name =
1680 .desc =
1681 .bit =
1682 },
1683 },
1684 */
1685 },
1686
1687 /* 34 */
1688 {.name = "response",
1689 .desc = "Count of different types of responses.",
1690 .event_select = 0x4,
1691 .escr_select = 0x3,
1692 .allowed_escrs = { 6, 29 },
1693 /* FIXME: Appendix A is missing event-mask info.
1694 .event_masks = {
1695 {.name =
1696 .desc =
1697 .bit =
1698 },
1699 },
1700 */
1701 },
1702
1703 /* 35 */
1704 {.name = "front_end_event",
1705 .desc = "Number of retirements of tagged uops which are specified "
1706 "through the front-end tagging mechanism.",
1707 .event_select = 0x8,
1708 .escr_select = 0x5,
1709 .allowed_escrs = { 21, 43 },
1710 .event_masks = {
1711 {.name = "NBOGUS",
1712 .desc = "The marked uops are not bogus.",
1713 .bit = 0,
1714 },
1715 {.name = "BOGUS",
1716 .desc = "The marked uops are bogus.",
1717 .bit = 1,
1718 },
1719 },
1720 },
1721
1722 /* 36 */
1723 {.name = "execution_event",
1724 .desc = "Number of retirements of tagged uops which are specified "
1725 "through the execution tagging mechanism. The event-mask "
1726 "allows from one to four types of uops to be tagged.",
1727 .event_select = 0xC,
1728 .escr_select = 0x5,
1729 .allowed_escrs = { 21, 43 },
1730 .event_masks = {
1731 {.name = "NBOGUS0",
1732 .desc = "The marked uops are not bogus.",
1733 .bit = 0,
1734 },
1735 {.name = "NBOGUS1",
1736 .desc = "The marked uops are not bogus.",
1737 .bit = 1,
1738 },
1739 {.name = "NBOGUS2",
1740 .desc = "The marked uops are not bogus.",
1741 .bit = 2,
1742 },
1743 {.name = "NBOGUS3",
1744 .desc = "The marked uops are not bogus.",
1745 .bit = 3,
1746 },
1747 {.name = "BOGUS0",
1748 .desc = "The marked uops are bogus.",
1749 .bit = 4,
1750 },
1751 {.name = "BOGUS1",
1752 .desc = "The marked uops are bogus.",
1753 .bit = 5,
1754 },
1755 {.name = "BOGUS2",
1756 .desc = "The marked uops are bogus.",
1757 .bit = 6,
1758 },
1759 {.name = "BOGUS3",
1760 .desc = "The marked uops are bogus.",
1761 .bit = 7,
1762 },
1763 },
1764 },
1765
1766 /* 37 */
1767 {.name = "replay_event",
1768 .desc = "Number of retirements of tagged uops which are specified "
1769 "through the replay tagging mechanism.",
1770 .event_select = 0x9,
1771 .escr_select = 0x5,
1772 .allowed_escrs = { 21, 43 },
1773 .event_masks = {
1774 {.name = "NBOGUS",
1775 .desc = "The marked uops are not bogus.",
1776 .bit = 0,
1777 },
1778 {.name = "BOGUS",
1779 .desc = "The marked uops are bogus.",
1780 .bit = 1,
1781 },
1782 {.name = "L1_LD_MISS",
1783 .desc = "Virtual mask for L1 cache load miss replays.",
1784 .bit = 2,
1785 },
1786 {.name = "L2_LD_MISS",
1787 .desc = "Virtual mask for L2 cache load miss replays.",
1788 .bit = 3,
1789 },
1790 {.name = "DTLB_LD_MISS",
1791 .desc = "Virtual mask for DTLB load miss replays.",
1792 .bit = 4,
1793 },
1794 {.name = "DTLB_ST_MISS",
1795 .desc = "Virtual mask for DTLB store miss replays.",
1796 .bit = 5,
1797 },
1798 {.name = "DTLB_ALL_MISS",
1799 .desc = "Virtual mask for all DTLB miss replays.",
1800 .bit = 6,
1801 },
1802 {.name = "BR_MSP",
1803 .desc = "Virtual mask for tagged mispredicted branch replays.",
1804 .bit = 7,
1805 },
1806 {.name = "MOB_LD_REPLAY",
1807 .desc = "Virtual mask for MOB load replays.",
1808 .bit = 8,
1809 },
1810 {.name = "SP_LD_RET",
1811 .desc = "Virtual mask for split load replays. Use with load_port_replay event.",
1812 .bit = 9,
1813 },
1814 {.name = "SP_ST_RET",
1815 .desc = "Virtual mask for split store replays. Use with store_port_replay event.",
1816 .bit = 10,
1817 },
1818 },
1819 },
1820
1821 /* 38 */
1822 {.name = "instr_retired",
1823 .desc = "Number of instructions retired during a clock cycle.",
1824 .event_select = 0x2,
1825 .escr_select = 0x4,
1826 .allowed_escrs = { 20, 42 },
1827 .event_masks = {
1828 {.name = "NBOGUSNTAG",
1829 .desc = "Non-bogus instructions that are not tagged.",
1830 .bit = 0,
1831 },
1832 {.name = "NBOGUSTAG",
1833 .desc = "Non-bogus instructions that are tagged.",
1834 .bit = 1,
1835 },
1836 {.name = "BOGUSNTAG",
1837 .desc = "Bogus instructions that are not tagged.",
1838 .bit = 2,
1839 },
1840 {.name = "BOGUSTAG",
1841 .desc = "Bogus instructions that are tagged.",
1842 .bit = 3,
1843 },
1844 },
1845 },
1846
1847 /* 39 */
1848 {.name = "uops_retired",
1849 .desc = "Number of uops retired during a clock cycle.",
1850 .event_select = 0x1,
1851 .escr_select = 0x4,
1852 .allowed_escrs = { 20, 42 },
1853 .event_masks = {
1854 {.name = "NBOGUS",
1855 .desc = "The marked uops are not bogus.",
1856 .bit = 0,
1857 },
1858 {.name = "BOGUS",
1859 .desc = "The marked uops are bogus.",
1860 .bit = 1,
1861 },
1862 },
1863 },
1864
1865 /* 40 */
1866 {.name = "uops_type",
1867 .desc = "This event is used in conjunction with with the front-end "
1868 "mechanism to tag load and store uops.",
1869 .event_select = 0x2,
1870 .escr_select = 0x2,
1871 .allowed_escrs = { 18, 41 },
1872 .event_masks = {
1873 {.name = "TAGLOADS",
1874 .desc = "The uop is a load operation.",
1875 .bit = 1,
1876 },
1877 {.name = "TAGSTORES",
1878 .desc = "The uop is a store operation.",
1879 .bit = 2,
1880 },
1881 },
1882 },
1883
1884 /* 41 */
1885 {.name = "branch_retired",
1886 .desc = "Number of retirements of a branch.",
1887 .event_select = 0x6,
1888 .escr_select = 0x5,
1889 .allowed_escrs = { 21, 43 },
1890 .event_masks = {
1891 {.name = "MMNP",
1892 .desc = "Branch not-taken predicted.",
1893 .bit = 0,
1894 },
1895 {.name = "MMNM",
1896 .desc = "Branch not-taken mispredicted.",
1897 .bit = 1,
1898 },
1899 {.name = "MMTP",
1900 .desc = "Branch taken predicted.",
1901 .bit = 2,
1902 },
1903 {.name = "MMTM",
1904 .desc = "Branch taken mispredicted.",
1905 .bit = 3,
1906 },
1907 },
1908 },
1909
1910 /* 42 */
1911 {.name = "mispred_branch_retired",
1912 .desc = "Number of retirements of mispredicted "
1913 "IA-32 branch instructions",
1914 .event_select = 0x3,
1915 .escr_select = 0x4,
1916 .allowed_escrs = { 20, 42 },
1917 .event_masks = {
1918 {.name = "BOGUS",
1919 .desc = "The retired instruction is not bogus.",
1920 .bit = 0,
1921 },
1922 },
1923 },
1924
1925 /* 43 */
1926 {.name = "x87_assist",
1927 .desc = "Number of retirements of x87 instructions that required "
1928 "special handling.",
1929 .event_select = 0x3,
1930 .escr_select = 0x5,
1931 .allowed_escrs = { 21, 43 },
1932 .event_masks = {
1933 {.name = "FPSU",
1934 .desc = "Handle FP stack underflow.",
1935 .bit = 0,
1936 },
1937 {.name = "FPSO",
1938 .desc = "Handle FP stack overflow.",
1939 .bit = 1,
1940 },
1941 {.name = "POAO",
1942 .desc = "Handle x87 output overflow.",
1943 .bit = 2,
1944 },
1945 {.name = "POAU",
1946 .desc = "Handle x87 output underflow.",
1947 .bit = 3,
1948 },
1949 {.name = "PREA",
1950 .desc = "Handle x87 input assist.",
1951 .bit = 4,
1952 },
1953 },
1954 },
1955
1956 /* 44 */
1957 {.name = "machine_clear",
1958 .desc = "Number of occurances when the entire "
1959 "pipeline of the machine is cleared.",
1960 .event_select = 0x2,
1961 .escr_select = 0x5,
1962 .allowed_escrs = { 21, 43 },
1963 .event_masks = {
1964 {.name = "CLEAR",
1965 .desc = "Counts for a portion of the many cycles while the "
1966 "machine is cleared for any cause. Use edge-"
1967 "triggering for this bit only to get a count of "
1968 "occurances versus a duration.",
1969 .bit = 0,
1970 },
1971 {.name = "MOCLEAR",
1972 .desc = "Increments each time the machine is cleared due to "
1973 "memory ordering issues.",
1974 .bit = 2,
1975 },
1976 {.name = "SMCLEAR",
1977 .desc = "Increments each time the machine is cleared due to "
1978 "self-modifying code issues.",
1979 .bit = 6,
1980 },
1981 },
1982 },
1983
1984 /* 45 */
1985 {.name = "instr_completed",
1986 .desc = "Instructions that have completed and "
1987 "retired during a clock cycle. Supported on models 3, 4, 6 only",
1988 .event_select = 0x7,
1989 .escr_select = 0x5,
1990 .allowed_escrs = { 21, 42 },
1991 .event_masks = {
1992 {.name = "NBOGUS",
1993 .desc = "Non-bogus instructions.",
1994 .bit = 0,
1995 },
1996 {.name = "BOGUS",
1997 .desc = "Bogus instructions.",
1998 .bit = 1,
1999 },
2000 },
2001 },
2002};
2003#define PME_INSTR_COMPLETED 45
2004#define PME_REPLAY_EVENT 37
2005#define PENTIUM4_EVENT_COUNT (sizeof(pentium4_events)/sizeof(pentium4_events[0]))
2006
2007/* CPU_CLK_UNHALTED uses the global_power_events event.
2008 * INST_RETIRED uses the instr_retired event.
2009 */
2010#define PENTIUM4_CPU_CLK_UNHALTED 24
2011#define PENTIUM4_INST_RETIRED 38
2012
2013#endif
2014
pentium4_escr_reg_t pentium4_escrs[]
pentium4_cccr_reg_t pentium4_cccrs[]
pentium4_event_t pentium4_events[]
pentium4_pmc_t pentium4_pmcs[PENTIUM4_NUM_PMCS]
#define PENTIUM4_NUM_PMCS
#define PENTIUM4_PMC_TYPE_CCCR
#define PENTIUM4_PMC_TYPE_ESCR