]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libpmc/pmc.p6.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libpmc / pmc.p6.3
1 .\" Copyright (c) 2003-2008 Joseph Koshy.  All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\"
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 .\" SUCH DAMAGE.
23 .\"
24 .\" $FreeBSD$
25 .\"
26 .Dd October 4, 2008
27 .Dt PMC.P6 3
28 .Os
29 .Sh NAME
30 .Nm pmc.p6
31 .Nd measurement events for
32 .Tn Intel
33 Pentium Pro, P-II, P-III family CPUs
34 .Sh LIBRARY
35 .Lb libpmc
36 .Sh SYNOPSIS
37 .In pmc.h
38 .Sh DESCRIPTION
39 Intel P6 PMCs are present in Intel
40 .Tn "Pentium Pro" ,
41 .Tn "Pentium II" ,
42 .Tn Celeron ,
43 .Tn "Pentium III"
44 and
45 .Tn "Pentium M"
46 processors.
47 .Pp
48 They are documented in
49 .Rs
50 .%B "IA-32 Intel(R) Architecture Software Developer's Manual"
51 .%T "Volume 3: System Programming Guide"
52 .%N "Order Number 245472-012"
53 .%D 2003
54 .%Q "Intel Corporation"
55 .Re
56 .Pp
57 Some of these events are affected by processor errata described in
58 .Rs
59 .%B "Intel(R) Pentium(R) III Processor Specification Update"
60 .%N "Document Number: 244453-054"
61 .%D "April 2005"
62 .%Q "Intel Corporation"
63 .Re
64 .Ss PMC Features
65 These CPUs have two counters, each 40 bits wide.
66 Some events may only be used on specific counters and some events are
67 defined only on specific processor models.
68 These PMCs support the following capabilities:
69 .Bl -column "PMC_CAP_INTERRUPT" "Support"
70 .It Em Capability Ta Em Support
71 .It PMC_CAP_CASCADE Ta \&No
72 .It PMC_CAP_EDGE Ta Yes
73 .It PMC_CAP_INTERRUPT Ta Yes
74 .It PMC_CAP_INVERT Ta Yes
75 .It PMC_CAP_READ Ta Yes
76 .It PMC_CAP_PRECISE Ta \&No
77 .It PMC_CAP_SYSTEM Ta Yes
78 .It PMC_CAP_TAGGING Ta \&No
79 .It PMC_CAP_THRESHOLD Ta Yes
80 .It PMC_CAP_USER Ta Yes
81 .It PMC_CAP_WRITE Ta Yes
82 .El
83 .Ss Event Qualifiers
84 Event specifiers for Intel P6 PMCs can have the following common
85 qualifiers:
86 .Bl -tag -width indent
87 .It Li cmask= Ns Ar value
88 Configure the PMC to increment only if the number of configured
89 events measured in a cycle is greater than or equal to
90 .Ar value .
91 .It Li edge
92 Configure the PMC to count the number of de-asserted to asserted
93 transitions of the conditions expressed by the other qualifiers.
94 If specified, the counter will increment only once whenever a
95 condition becomes true, irrespective of the number of clocks during
96 which the condition remains true.
97 .It Li inv
98 Invert the sense of comparison when the
99 .Dq Li cmask
100 qualifier is present, making the counter increment when the number of
101 events per cycle is less than the value specified by the
102 .Dq Li cmask
103 qualifier.
104 .It Li os
105 Configure the PMC to count events happening at processor privilege
106 level 0.
107 .It Li umask= Ns Ar value
108 This qualifier is used to further qualify the event selected (see
109 below).
110 .It Li usr
111 Configure the PMC to count events occurring at privilege levels 1, 2
112 or 3.
113 .El
114 .Pp
115 If neither of the
116 .Dq Li os
117 or
118 .Dq Li usr
119 qualifiers are specified, the default is to enable both.
120 .Pp
121 The event specifiers supported by Intel P6 PMCs are:
122 .Bl -tag -width indent
123 .It Li p6-baclears
124 .Pq Event E6H
125 Count the number of times a static branch prediction was made by the
126 branch decoder because the BTB did not have a prediction.
127 .It Li p6-br-bac-missp-exec
128 .Pq Event 8AH , Tn "Pentium M"
129 Count the number of branch instructions executed that where
130 mispredicted at the Front End (BAC).
131 .It Li p6-br-bogus
132 .Pq Event E4H
133 Count the number of bogus branches.
134 .It Li p6-br-call-exec
135 .Pq Event 92H , Tn "Pentium M"
136 Count the number of call instructions executed.
137 .It Li p6-br-call-missp-exec
138 .Pq Event 93H , Tn "Pentium M"
139 Count the number of call instructions executed that were mispredicted.
140 .It Li p6-br-cnd-exec
141 .Pq Event 8BH , Tn "Pentium M"
142 Count the number of conditional branch instructions executed.
143 .It Li p6-br-cnd-missp-exec
144 .Pq Event 8CH , Tn "Pentium M"
145 Count the number of conditional branch instructions executed that were
146 mispredicted.
147 .It Li p6-br-ind-call-exec
148 .Pq Event 94H , Tn "Pentium M"
149 Count the number of indirect call instructions executed.
150 .It Li p6-br-ind-exec
151 .Pq Event 8DH , Tn "Pentium M"
152 Count the number of indirect branch instructions executed.
153 .It Li p6-br-ind-missp-exec
154 .Pq Event 8EH , Tn "Pentium M"
155 Count the number of indirect branch instructions executed that were
156 mispredicted.
157 .It Li p6-br-inst-decoded
158 .Pq Event E0H
159 Count the number of branch instructions decoded.
160 .It Li p6-br-inst-exec
161 .Pq Event 88H , Tn "Pentium M"
162 Count the number of branch instructions executed but necessarily retired.
163 .It Li p6-br-inst-retired
164 .Pq Event C4H
165 Count the number of branch instructions retired.
166 .It Li p6-br-miss-pred-retired
167 .Pq Event C5H
168 Count the number of mispredicted branch instructions retired.
169 .It Li p6-br-miss-pred-taken-ret
170 .Pq Event C9H
171 Count the number of taken mispredicted branches retired.
172 .It Li p6-br-missp-exec
173 .Pq Event 89H , Tn "Pentium M"
174 Count the number of branch instructions executed that were
175 mispredicted at execution.
176 .It Li p6-br-ret-bac-missp-exec
177 .Pq Event 91H , Tn "Pentium M"
178 Count the number of return instructions executed that were
179 mispredicted at the Front End (BAC).
180 .It Li p6-br-ret-exec
181 .Pq Event 8FH , Tn "Pentium M"
182 Count the number of return instructions executed.
183 .It Li p6-br-ret-missp-exec
184 .Pq Event 90H , Tn "Pentium M"
185 Count the number of return instructions executed that were
186 mispredicted at execution.
187 .It Li p6-br-taken-retired
188 .Pq Event C9H
189 Count the number of taken branches retired.
190 .It Li p6-btb-misses
191 .Pq Event E2H
192 Count the number of branches for which the BTB did not produce a
193 prediction.
194 .It Li p6-bus-bnr-drv
195 .Pq Event 61H
196 Count the number of bus clock cycles during which this processor is
197 driving the BNR# pin.
198 .It Li p6-bus-data-rcv
199 .Pq Event 64H
200 Count the number of bus clock cycles during which this processor is
201 receiving data.
202 .It Li p6-bus-drdy-clocks Op Li ,umask= Ns Ar qualifier
203 .Pq Event 62H
204 Count the number of clocks during which DRDY# is asserted.
205 An additional qualifier may be specified, and comprises one of the
206 following keywords:
207 .Pp
208 .Bl -tag -width indent -compact
209 .It Li any
210 Count transactions generated by any agent on the bus.
211 .It Li self
212 Count transactions generated by this processor.
213 .El
214 .Pp
215 The default is to count operations generated by this processor.
216 .It Li p6-bus-hit-drv
217 .Pq Event 7AH
218 Count the number of bus clock cycles during which this processor is
219 driving the HIT# pin.
220 .It Li p6-bus-hitm-drv
221 .Pq Event 7BH
222 Count the number of bus clock cycles during which this processor is
223 driving the HITM# pin.
224 .It Li p6-bus-lock-clocks Op Li ,umask= Ns Ar qualifier
225 .Pq Event 63H
226 Count the number of clocks during with LOCK# is asserted on the
227 external system bus.
228 An additional qualifier may be specified and comprises one of the following
229 keywords:
230 .Pp
231 .Bl -tag -width indent -compact
232 .It Li any
233 Count transactions generated by any agent on the bus.
234 .It Li self
235 Count transactions generated by this processor.
236 .El
237 .Pp
238 The default is to count operations generated by this processor.
239 .It Li p6-bus-req-outstanding
240 .Pq Event 60H
241 Count the number of bus requests outstanding in any given cycle.
242 .It Li p6-bus-snoop-stall
243 .Pq Event 7EH
244 Count the number of clock cycles during which the bus is snoop stalled.
245 .It Li p6-bus-tran-any Op Li ,umask= Ns Ar qualifier
246 .Pq Event 70H
247 Count the number of completed bus transactions of any kind.
248 An additional qualifier may be specified and comprises one of the following
249 keywords:
250 .Pp
251 .Bl -tag -width indent -compact
252 .It Li any
253 Count transactions generated by any agent on the bus.
254 .It Li self
255 Count transactions generated by this processor.
256 .El
257 .Pp
258 The default is to count operations generated by this processor.
259 .It Li p6-bus-tran-brd Op Li ,umask= Ns Ar qualifier
260 .Pq Event 65H
261 Count the number of burst read transactions.
262 An additional qualifier may be specified and comprises one of the following
263 keywords:
264 .Pp
265 .Bl -tag -width indent -compact
266 .It Li any
267 Count transactions generated by any agent on the bus.
268 .It Li self
269 Count transactions generated by this processor.
270 .El
271 .Pp
272 The default is to count operations generated by this processor.
273 .It Li p6-bus-tran-burst Op Li ,umask= Ns Ar qualifier
274 .Pq Event 6EH
275 Count the number of completed burst transactions.
276 An additional qualifier may be specified and comprises one of the following
277 keywords:
278 .Pp
279 .Bl -tag -width indent -compact
280 .It Li any
281 Count transactions generated by any agent on the bus.
282 .It Li self
283 Count transactions generated by this processor.
284 .El
285 .Pp
286 The default is to count operations generated by this processor.
287 .It Li p6-bus-tran-def Op Li ,umask= Ns Ar qualifier
288 .Pq Event 6DH
289 Count the number of completed deferred transactions.
290 An additional qualifier may be specified and comprises one of the following
291 keywords:
292 .Pp
293 .Bl -tag -width indent -compact
294 .It Li any
295 Count transactions generated by any agent on the bus.
296 .It Li self
297 Count transactions generated by this processor.
298 .El
299 .Pp
300 The default is to count operations generated by this processor.
301 .It Li p6-bus-tran-ifetch Op Li ,umask= Ns Ar qualifier
302 .Pq Event 68H
303 Count the number of completed instruction fetch transactions.
304 An additional qualifier may be specified and comprises one of the following
305 keywords:
306 .Pp
307 .Bl -tag -width indent -compact
308 .It Li any
309 Count transactions generated by any agent on the bus.
310 .It Li self
311 Count transactions generated by this processor.
312 .El
313 .Pp
314 The default is to count operations generated by this processor.
315 .It Li p6-bus-tran-inval Op Li ,umask= Ns Ar qualifier
316 .Pq Event 69H
317 Count the number of completed invalidate transactions.
318 An additional qualifier may be specified and comprises one of the following
319 keywords:
320 .Pp
321 .Bl -tag -width indent -compact
322 .It Li any
323 Count transactions generated by any agent on the bus.
324 .It Li self
325 Count transactions generated by this processor.
326 .El
327 .Pp
328 The default is to count operations generated by this processor.
329 .It Li p6-bus-tran-mem Op Li ,umask= Ns Ar qualifier
330 .Pq Event 6FH
331 Count the number of completed memory transactions.
332 An additional qualifier may be specified and comprises one of the following
333 keywords:
334 .Pp
335 .Bl -tag -width indent -compact
336 .It Li any
337 Count transactions generated by any agent on the bus.
338 .It Li self
339 Count transactions generated by this processor.
340 .El
341 .Pp
342 The default is to count operations generated by this processor.
343 .It Li p6-bus-tran-pwr Op Li ,umask= Ns Ar qualifier
344 .Pq Event 6AH
345 Count the number of completed partial write transactions.
346 An additional qualifier may be specified and comprises one of the following
347 keywords:
348 .Pp
349 .Bl -tag -width indent -compact
350 .It Li any
351 Count transactions generated by any agent on the bus.
352 .It Li self
353 Count transactions generated by this processor.
354 .El
355 .Pp
356 The default is to count operations generated by this processor.
357 .It Li p6-bus-tran-rfo Op Li ,umask= Ns Ar qualifier
358 .Pq Event 66H
359 Count the number of completed read-for-ownership transactions.
360 An additional qualifier may be specified and comprises one of the following
361 keywords:
362 .Pp
363 .Bl -tag -width indent -compact
364 .It Li any
365 Count transactions generated by any agent on the bus.
366 .It Li self
367 Count transactions generated by this processor.
368 .El
369 .Pp
370 The default is to count operations generated by this processor.
371 .It Li p6-bus-trans-io Op Li ,umask= Ns Ar qualifier
372 .Pq Event 6CH
373 Count the number of completed I/O transactions.
374 An additional qualifier may be specified and comprises one of the following
375 keywords:
376 .Pp
377 .Bl -tag -width indent -compact
378 .It Li any
379 Count transactions generated by any agent on the bus.
380 .It Li self
381 Count transactions generated by this processor.
382 .El
383 .Pp
384 The default is to count operations generated by this processor.
385 .It Li p6-bus-trans-p Op Li ,umask= Ns Ar qualifier
386 .Pq Event 6BH
387 Count the number of completed partial transactions.
388 An additional qualifier may be specified and comprises one of the following
389 keywords:
390 .Pp
391 .Bl -tag -width indent -compact
392 .It Li any
393 Count transactions generated by any agent on the bus.
394 .It Li self
395 Count transactions generated by this processor.
396 .El
397 .Pp
398 The default is to count operations generated by this processor.
399 .It Li p6-bus-trans-wb Op Li ,umask= Ns Ar qualifier
400 .Pq Event 67H
401 Count the number of completed write-back transactions.
402 An additional qualifier may be specified and comprises one of the following
403 keywords:
404 .Pp
405 .Bl -tag -width indent -compact
406 .It Li any
407 Count transactions generated by any agent on the bus.
408 .It Li self
409 Count transactions generated by this processor.
410 .El
411 .Pp
412 The default is to count operations generated by this processor.
413 .It Li p6-cpu-clk-unhalted
414 .Pq Event 79H
415 Count the number of cycles during with the processor was not halted.
416 .Pp
417 .Pq Tn "Pentium M"
418 Count the number of cycles during with the processor was not halted
419 and not in a thermal trip.
420 .It Li p6-cycles-div-busy
421 .Pq Event 14H
422 Count the number of cycles during which the divider is busy and cannot
423 accept new divides.
424 This event is only allocated on counter 0.
425 .It Li p6-cycles-int-pending-and-masked
426 .Pq Event C7H
427 Count the number of processor cycles for which interrupts were
428 disabled and interrupts were pending.
429 .It Li p6-cycles-int-masked
430 .Pq Event C6H
431 Count the number of processor cycles for which interrupts were
432 disabled.
433 .It Li p6-data-mem-refs
434 .Pq Event 43H
435 Count all loads and all stores using any memory type, including
436 internal retries.
437 Each part of a split store is counted separately.
438 .It Li p6-dcu-lines-in
439 .Pq Event 45H
440 Count the total lines allocated in the data cache unit.
441 .It Li p6-dcu-m-lines-in
442 .Pq Event 46H
443 Count the number of M state lines allocated in the data cache unit.
444 .It Li p6-dcu-m-lines-out
445 .Pq Event 47H
446 Count the number of M state lines evicted from the data cache unit.
447 .It Li p6-dcu-miss-outstanding
448 .Pq Event 48H
449 Count the weighted number of cycles while a data cache unit miss is
450 outstanding, incremented by the number of outstanding cache misses at
451 any time.
452 .It Li p6-div
453 .Pq Event 13H
454 Count the number of integer and floating-point divides including
455 speculative divides.
456 This event is only allocated on counter 1.
457 .It Li p6-emon-esp-uops
458 .Pq Event D7H , Tn "Pentium M"
459 Count the total number of micro-ops.
460 .It Li p6-emon-est-trans Op Li ,umask= Ns Ar qualifier
461 .Pq Event 58H , Tn "Pentium M"
462 Count the number of
463 .Tn "Enhanced Intel SpeedStep"
464 transitions.
465 An additional qualifier may be specified, and can be one of the
466 following keywords:
467 .Pp
468 .Bl -tag -width indent -compact
469 .It Li all
470 Count all transitions.
471 .It Li freq
472 Count only frequency transitions.
473 .El
474 .Pp
475 The default is to count all transitions.
476 .It Li p6-emon-fused-uops-ret Op Li ,umask= Ns Ar qualifier
477 .Pq Event DAH , Tn "Pentium M"
478 Count the number of retired fused micro-ops.
479 An additional qualifier may be specified, and may be one of the
480 following keywords:
481 .Pp
482 .Bl -tag -width indent -compact
483 .It Li all
484 Count all fused micro-ops.
485 .It Li loadop
486 Count only load and op micro-ops.
487 .It Li stdsta
488 Count only STD/STA micro-ops.
489 .El
490 .Pp
491 The default is to count all fused micro-ops.
492 .It Li p6-emon-kni-comp-inst-ret
493 .Pq Event D9H , Tn "Pentium III"
494 Count the number of SSE computational instructions retired.
495 An additional qualifier may be specified, and comprises one of the
496 following keywords:
497 .Pp
498 .Bl -tag -width indent -compact
499 .It Li packed-and-scalar
500 Count packed and scalar operations.
501 .It Li scalar
502 Count scalar operations only.
503 .El
504 .Pp
505 The default is to count packed and scalar operations.
506 .It Li p6-emon-kni-inst-retired Op Li ,umask= Ns Ar qualifier
507 .Pq Event D8H , Tn "Pentium III"
508 Count the number of SSE instructions retired.
509 An additional qualifier may be specified, and comprises one of the
510 following keywords:
511 .Pp
512 .Bl -tag -width indent -compact
513 .It Li packed-and-scalar
514 Count packed and scalar operations.
515 .It Li scalar
516 Count scalar operations only.
517 .El
518 .Pp
519 The default is to count packed and scalar operations.
520 .It Li p6-emon-kni-pref-dispatched Op Li ,umask= Ns Ar qualifier
521 .Pq Event 07H , Tn "Pentium III"
522 Count the number of SSE prefetch or weakly ordered instructions
523 dispatched (including speculative prefetches).
524 An additional qualifier may be specified, and comprises one of the
525 following keywords:
526 .Pp
527 .Bl -tag -width indent -compact
528 .It Li nta
529 Count non-temporal prefetches.
530 .It Li t1
531 Count prefetches to L1.
532 .It Li t2
533 Count prefetches to L2.
534 .It Li wos
535 Count weakly ordered stores.
536 .El
537 .Pp
538 The default is to count non-temporal prefetches.
539 .It Li p6-emon-kni-pref-miss Op Li ,umask= Ns Ar qualifier
540 .Pq Event 4BH , Tn "Pentium III"
541 Count the number of prefetch or weakly ordered instructions that miss
542 all caches.
543 An additional qualifier may be specified, and comprises one of the
544 following keywords:
545 .Pp
546 .Bl -tag -width indent -compact
547 .It Li nta
548 Count non-temporal prefetches.
549 .It Li t1
550 Count prefetches to L1.
551 .It Li t2
552 Count prefetches to L2.
553 .It Li wos
554 Count weakly ordered stores.
555 .El
556 .Pp
557 The default is to count non-temporal prefetches.
558 .It Li p6-emon-pref-rqsts-dn
559 .Pq Event F8H , Tn "Pentium M"
560 Count the number of downward prefetches issued.
561 .It Li p6-emon-pref-rqsts-up
562 .Pq Event F0H , Tn "Pentium M"
563 Count the number of upward prefetches issued.
564 .It Li p6-emon-simd-instr-retired
565 .Pq Event CEH , Tn "Pentium M"
566 Count the number of retired
567 .Tn MMX
568 instructions.
569 .It Li p6-emon-sse-sse2-comp-inst-retired Op Li ,umask= Ns Ar qualifier
570 .Pq Event D9H , Tn "Pentium M"
571 Count the number of computational SSE instructions retired.
572 An additional qualifier may be specified and can be one of the
573 following keywords:
574 .Pp
575 .Bl -tag -width indent -compact
576 .It Li sse-packed-single
577 Count SSE packed-single instructions.
578 .It Li sse-scalar-single
579 Count SSE scalar-single instructions.
580 .It Li sse2-packed-double
581 Count SSE2 packed-double instructions.
582 .It Li sse2-scalar-double
583 Count SSE2 scalar-double instructions.
584 .El
585 .Pp
586 The default is to count SSE packed-single instructions.
587 .It Li p6-emon-sse-sse2-inst-retired Op Li ,umask= Ns Ar qualifier
588 .Pq Event D8H , Tn "Pentium M"
589 Count the number of SSE instructions retired.
590 An additional qualifier can be specified, and can be one of the
591 following keywords:
592 .Pp
593 .Bl -tag -width indent -compact
594 .It Li sse-packed-single
595 Count SSE packed-single instructions.
596 .It Li sse-packed-single-scalar-single
597 Count SSE packed-single and scalar-single instructions.
598 .It Li sse2-packed-double
599 Count SSE2 packed-double instructions.
600 .It Li sse2-scalar-double
601 Count SSE2 scalar-double instructions.
602 .El
603 .Pp
604 The default is to count SSE packed-single instructions.
605 .It Li p6-emon-synch-uops
606 .Pq Event D3H , Tn "Pentium M"
607 Count the number of sync micro-ops.
608 .It Li p6-emon-thermal-trip
609 .Pq Event 59H , Tn "Pentium M"
610 Count the duration or occurrences of thermal trips.
611 Use the
612 .Dq Li edge
613 qualifier to count occurrences of thermal trips.
614 .It Li p6-emon-unfusion
615 .Pq Event DBH , Tn "Pentium M"
616 Count the number of unfusion events in the reorder buffer.
617 .It Li p6-flops
618 .Pq Event C1H
619 Count the number of computational floating point operations retired.
620 This event is only allocated on counter 0.
621 .It Li p6-fp-assist
622 .Pq Event 11H
623 Count the number of floating point exceptions handled by microcode.
624 This event is only allocated on counter 1.
625 .It Li p6-fp-comps-ops-exe
626 .Pq Event 10H
627 Count the number of computation floating point operations executed.
628 This event is only allocated on counter 0.
629 .It Li p6-fp-mmx-trans Op Li ,umask= Ns Ar qualifier
630 .Pq Event CCH , Tn "Pentium II" , Tn "Pentium III"
631 Count the number of transitions between MMX and floating-point
632 instructions.
633 An additional qualifier may be specified, and comprises one of the
634 following keywords:
635 .Pp
636 .Bl -tag -width indent -compact
637 .It Li mmxtofp
638 Count transitions from MMX instructions to floating-point instructions.
639 .It Li fptommx
640 Count transitions from floating-point instructions to MMX instructions.
641 .El
642 .Pp
643 The default is to count MMX to floating-point transitions.
644 .It Li p6-hw-int-rx
645 .Pq Event C8H
646 Count the number of hardware interrupts received.
647 .It Li p6-ifu-ifetch
648 .Pq Event 80H
649 Count the number of instruction fetches, both cacheable and non-cacheable.
650 .It Li p6-ifu-ifetch-miss
651 .Pq Event 81H
652 Count the number of instruction fetch misses (i.e., those that produce
653 memory accesses).
654 .It Li p6-ifu-mem-stall
655 .Pq Event 86H
656 Count the number of cycles instruction fetch is stalled for any reason.
657 .It Li p6-ild-stall
658 .Pq Event 87H
659 Count the number of cycles the instruction length decoder is stalled.
660 .It Li p6-inst-decoded
661 .Pq Event D0H
662 Count the number of instructions decoded.
663 .It Li p6-inst-retired
664 .Pq Event C0H
665 Count the number of instructions retired.
666 .It Li p6-itlb-miss
667 .Pq Event 85H
668 Count the number of instruction TLB misses.
669 .It Li p6-l2-ads
670 .Pq Event 21H
671 Count the number of L2 address strobes.
672 .It Li p6-l2-dbus-busy
673 .Pq Event 22H
674 Count the number of cycles during which the L2 cache data bus was busy.
675 .It Li p6-l2-dbus-busy-rd
676 .Pq Event 23H
677 Count the number of cycles during which the L2 cache data bus was busy
678 transferring read data from L2 to the processor.
679 .It Li p6-l2-ifetch Op Li ,umask= Ns Ar qualifier
680 .Pq Event 28H
681 Count the number of L2 instruction fetches.
682 An additional qualifier may be specified and comprises a list of the following
683 keywords separated by
684 .Ql +
685 characters:
686 .Pp
687 .Bl -tag -width indent -compact
688 .It Li e
689 Count operations affecting E (exclusive) state lines.
690 .It Li i
691 Count operations affecting I (invalid) state lines.
692 .It Li m
693 Count operations affecting M (modified) state lines.
694 .It Li s
695 Count operations affecting S (shared) state lines.
696 .El
697 .Pp
698 The default is to count operations affecting all (MESI) state lines.
699 .It Li p6-l2-ld Op Li ,umask= Ns Ar qualifier
700 .Pq Event 29H
701 Count the number of L2 data loads.
702 An additional qualifier may be specified and comprises a list of the following
703 keywords separated by
704 .Ql +
705 characters:
706 .Pp
707 .Bl -tag -width indent -compact
708 .It Li both
709 .Pq Tn "Pentium M"
710 Count both hardware-prefetched lines and non-hardware-prefetched lines.
711 .It Li e
712 Count operations affecting E (exclusive) state lines.
713 .It Li hw
714 .Pq Tn "Pentium M"
715 Count hardware-prefetched lines only.
716 .It Li i
717 Count operations affecting I (invalid) state lines.
718 .It Li m
719 Count operations affecting M (modified) state lines.
720 .It Li nonhw
721 .Pq Tn "Pentium M"
722 Exclude hardware-prefetched lines.
723 .It Li s
724 Count operations affecting S (shared) state lines.
725 .El
726 .Pp
727 The default on processors other than
728 .Tn "Pentium M"
729 processors is to count operations affecting all (MESI) state lines.
730 The default on
731 .Tn "Pentium M"
732 processors is to count both hardware-prefetched and
733 non-hardware-prefetch operations on all (MESI) state lines.
734 .Pq Errata
735 This event is affected by processor errata E53.
736 .It Li p6-l2-lines-in Op Li ,umask= Ns Ar qualifier
737 .Pq Event 24H
738 Count the number of L2 lines allocated.
739 An additional qualifier may be specified and comprises a list of the following
740 keywords separated by
741 .Ql +
742 characters:
743 .Pp
744 .Bl -tag -width indent -compact
745 .It Li both
746 .Pq Tn "Pentium M"
747 Count both hardware-prefetched lines and non-hardware-prefetched lines.
748 .It Li e
749 Count operations affecting E (exclusive) state lines.
750 .It Li hw
751 .Pq Tn "Pentium M"
752 Count hardware-prefetched lines only.
753 .It Li i
754 Count operations affecting I (invalid) state lines.
755 .It Li m
756 Count operations affecting M (modified) state lines.
757 .It Li nonhw
758 .Pq Tn "Pentium M"
759 Exclude hardware-prefetched lines.
760 .It Li s
761 Count operations affecting S (shared) state lines.
762 .El
763 .Pp
764 The default on processors other than
765 .Tn "Pentium M"
766 processors is to count operations affecting all (MESI) state lines.
767 The default on
768 .Tn "Pentium M"
769 processors is to count both hardware-prefetched and
770 non-hardware-prefetch operations on all (MESI) state lines.
771 .Pq Errata
772 This event is affected by processor errata E45.
773 .It Li p6-l2-lines-out Op Li ,umask= Ns Ar qualifier
774 .Pq Event 26H
775 Count the number of L2 lines evicted.
776 An additional qualifier may be specified and comprises a list of the following
777 keywords separated by
778 .Ql +
779 characters:
780 .Pp
781 .Bl -tag -width indent -compact
782 .It Li both
783 .Pq Tn "Pentium M"
784 Count both hardware-prefetched lines and non-hardware-prefetched lines.
785 .It Li e
786 Count operations affecting E (exclusive) state lines.
787 .It Li hw
788 .Pq Tn "Pentium M"
789 Count hardware-prefetched lines only.
790 .It Li i
791 Count operations affecting I (invalid) state lines.
792 .It Li m
793 Count operations affecting M (modified) state lines.
794 .It Li nonhw
795 .Pq Tn "Pentium M" only
796 Exclude hardware-prefetched lines.
797 .It Li s
798 Count operations affecting S (shared) state lines.
799 .El
800 .Pp
801 The default on processors other than
802 .Tn "Pentium M"
803 processors is to count operations affecting all (MESI) state lines.
804 The default on
805 .Tn "Pentium M"
806 processors is to count both hardware-prefetched and
807 non-hardware-prefetch operations on all (MESI) state lines.
808 .Pq Errata
809 This event is affected by processor errata E45.
810 .It Li p6-l2-m-lines-inm
811 .Pq Event 25H
812 Count the number of modified lines allocated in L2 cache.
813 .It Li p6-l2-m-lines-outm Op Li ,umask= Ns Ar qualifier
814 .Pq Event 27H
815 Count the number of L2 M-state lines evicted.
816 .Pp
817 .Pq Tn "Pentium M"
818 On these processors an additional qualifier may be specified and
819 comprises a list of the following keywords separated by
820 .Ql +
821 characters:
822 .Pp
823 .Bl -tag -width indent -compact
824 .It Li both
825 Count both hardware-prefetched lines and non-hardware-prefetched lines.
826 .It Li hw
827 Count hardware-prefetched lines only.
828 .It Li nonhw
829 Exclude hardware-prefetched lines.
830 .El
831 .Pp
832 The default is to count both hardware-prefetched and
833 non-hardware-prefetch operations.
834 .Pq Errata
835 This event is affected by processor errata E53.
836 .It Li p6-l2-rqsts Op Li ,umask= Ns Ar qualifier
837 .Pq Event 2EH
838 Count the total number of L2 requests.
839 An additional qualifier may be specified and comprises a list of the following
840 keywords separated by
841 .Ql +
842 characters:
843 .Pp
844 .Bl -tag -width indent -compact
845 .It Li e
846 Count operations affecting E (exclusive) state lines.
847 .It Li i
848 Count operations affecting I (invalid) state lines.
849 .It Li m
850 Count operations affecting M (modified) state lines.
851 .It Li s
852 Count operations affecting S (shared) state lines.
853 .El
854 .Pp
855 The default is to count operations affecting all (MESI) state lines.
856 .It Li p6-l2-st
857 .Pq Event 2AH
858 Count the number of L2 data stores.
859 An additional qualifier may be specified and comprises a list of the following
860 keywords separated by
861 .Ql +
862 characters:
863 .Pp
864 .Bl -tag -width indent -compact
865 .It Li e
866 Count operations affecting E (exclusive) state lines.
867 .It Li i
868 Count operations affecting I (invalid) state lines.
869 .It Li m
870 Count operations affecting M (modified) state lines.
871 .It Li s
872 Count operations affecting S (shared) state lines.
873 .El
874 .Pp
875 The default is to count operations affecting all (MESI) state lines.
876 .It Li p6-ld-blocks
877 .Pq Event 03H
878 Count the number of load operations delayed due to store buffer blocks.
879 .It Li p6-misalign-mem-ref
880 .Pq Event 05H
881 Count the number of misaligned data memory references (crossing a 64
882 bit boundary).
883 .It Li p6-mmx-assist
884 .Pq Event CDH , Tn "Pentium II" , Tn "Pentium III"
885 Count the number of MMX assists executed.
886 .It Li p6-mmx-instr-exec
887 .Pq Event B0H
888 .Pq Tn Celeron , Tn "Pentium II"
889 Count the number of MMX instructions executed, except MOVQ and MOVD
890 stores from register to memory.
891 .It Li p6-mmx-instr-ret
892 .Pq Event CEH , Tn "Pentium II"
893 Count the number of MMX instructions retired.
894 .It Li p6-mmx-instr-type-exec Op Li ,umask= Ns Ar qualifier
895 .Pq Event B3H , Tn "Pentium II" , Tn "Pentium III"
896 Count the number of MMX instructions executed.
897 An additional qualifier may be specified and comprises a list of
898 the following keywords separated by
899 .Ql +
900 characters:
901 .Pp
902 .Bl -tag -width indent -compact
903 .It Li pack
904 Count MMX pack operation instructions.
905 .It Li packed-arithmetic
906 Count MMX packed arithmetic instructions.
907 .It Li packed-logical
908 Count MMX packed logical instructions.
909 .It Li packed-multiply
910 Count MMX packed multiply instructions.
911 .It Li packed-shift
912 Count MMX packed shift instructions.
913 .It Li unpack
914 Count MMX unpack operation instructions.
915 .El
916 .Pp
917 The default is to count all operations.
918 .It Li p6-mmx-sat-instr-exec
919 .Pq Event B1H , Tn "Pentium II" , Tn "Pentium III"
920 Count the number of MMX saturating instructions executed.
921 .It Li p6-mmx-uops-exec
922 .Pq Event B2H , Tn "Pentium II" , Tn "Pentium III"
923 Count the number of MMX micro-ops executed.
924 .It Li p6-mul
925 .Pq Event 12H
926 Count the number of integer and floating-point multiplies, including
927 speculative multiplies.
928 This event is only allocated on counter 1.
929 .It Li p6-partial-rat-stalls
930 .Pq Event D2H
931 Count the number of cycles or events for partial stalls.
932 .It Li p6-resource-stalls
933 .Pq Event A2H
934 Count the number of cycles there was a resource related stall of any kind.
935 .It Li p6-ret-seg-renames
936 .Pq Event D6H , Tn "Pentium II" , Tn "Pentium III"
937 Count the number of segment register rename events retired.
938 .It Li p6-sb-drains
939 .Pq Event 04H
940 Count the number of cycles the store buffer is draining.
941 .It Li p6-seg-reg-renames Op Li ,umask= Ns Ar qualifier
942 .Pq Event D5H , Tn "Pentium II" , Tn "Pentium III"
943 Count the number of segment register renames.
944 An additional qualifier may be specified, and comprises a list of the
945 following keywords separated by
946 .Ql +
947 characters:
948 .Pp
949 .Bl -tag -width indent -compact
950 .It Li ds
951 Count renames for segment register DS.
952 .It Li es
953 Count renames for segment register ES.
954 .It Li fs
955 Count renames for segment register FS.
956 .It Li gs
957 Count renames for segment register GS.
958 .El
959 .Pp
960 The default is to count operations affecting all segment registers.
961 .It Li p6-seg-rename-stalls
962 .Pq Event D4H , Tn "Pentium II" , Tn "Pentium III"
963 Count the number of segment register renaming stalls.
964 An additional qualifier may be specified, and comprises a list of the
965 following keywords separated by
966 .Ql +
967 characters:
968 .Pp
969 .Bl -tag -width indent -compact
970 .It Li ds
971 Count stalls for segment register DS.
972 .It Li es
973 Count stalls for segment register ES.
974 .It Li fs
975 Count stalls for segment register FS.
976 .It Li gs
977 Count stalls for segment register GS.
978 .El
979 .Pp
980 The default is to count operations affecting all the segment registers.
981 .It Li p6-segment-reg-loads
982 .Pq Event 06H
983 Count the number of segment register loads.
984 .It Li p6-uops-retired
985 .Pq Event C2H
986 Count the number of micro-ops retired.
987 .El
988 .Ss Event Name Aliases
989 The following table shows the mapping between the PMC-independent
990 aliases supported by
991 .Lb libpmc
992 and the underlying hardware events used.
993 .Bl -column "branch-mispredicts" "Description"
994 .It Em Alias Ta Em Event
995 .It Li branches Ta Li p6-br-inst-retired
996 .It Li branch-mispredicts Ta Li p6-br-miss-pred-retired
997 .It Li dc-misses Ta Li p6-dcu-lines-in
998 .It Li ic-misses Ta Li p6-ifu-fetch-miss
999 .It Li instructions Ta Li p6-inst-retired
1000 .It Li interrupts Ta Li p6-hw-int-rx
1001 .It Li unhalted-cycles Ta Li p6-cpu-clk-unhalted
1002 .El
1003 .Sh SEE ALSO
1004 .Xr pmc 3 ,
1005 .Xr pmc.atom 3 ,
1006 .Xr pmc.core 3 ,
1007 .Xr pmc.core2 3 ,
1008 .Xr pmc.iaf 3 ,
1009 .Xr pmc.k7 3 ,
1010 .Xr pmc.k8 3 ,
1011 .Xr pmc.p4 3 ,
1012 .Xr pmc.p5 3 ,
1013 .Xr pmc.soft 3 ,
1014 .Xr pmc.tsc 3 ,
1015 .Xr pmclog 3 ,
1016 .Xr hwpmc 4
1017 .Sh HISTORY
1018 The
1019 .Nm pmc
1020 library first appeared in
1021 .Fx 6.0 .
1022 .Sh AUTHORS
1023 The
1024 .Lb libpmc
1025 library was written by
1026 .An "Joseph Koshy"
1027 .Aq jkoshy@FreeBSD.org .