]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libpmc/pmc.k8.3
zfs: merge openzfs/zfs@e13538856
[FreeBSD/FreeBSD.git] / lib / libpmc / pmc.k8.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 .Dd October 4, 2008
25 .Dt PMC.K8 3
26 .Os
27 .Sh NAME
28 .Nm pmc.k8
29 .Nd measurement events for
30 .Tn AMD
31 .Tn Athlon 64
32 (K8 family) CPUs
33 .Sh LIBRARY
34 .Lb libpmc
35 .Sh SYNOPSIS
36 .In pmc.h
37 .Sh DESCRIPTION
38 AMD K8 PMCs are present in the
39 .Tn "AMD Athlon64"
40 and
41 .Tn "AMD Opteron"
42 series of CPUs.
43 They are documented in the
44 .Rs
45 .%B "BIOS and Kernel Developer's Guide for the AMD Athlon(tm) 64 and AMD Opteron Processors"
46 .%N "Publication No. 26094"
47 .%D "April 2004"
48 .%Q "Advanced Micro Devices, Inc."
49 .Re
50 .Ss PMC Features
51 AMD K8 PMCs are 48 bits wide.
52 Each CPU contains 4 PMCs with the following capabilities:
53 .Bl -column "PMC_CAP_INTERRUPT" "Support"
54 .It Em Capability Ta Em Support
55 .It PMC_CAP_CASCADE Ta \&No
56 .It PMC_CAP_EDGE Ta Yes
57 .It PMC_CAP_INTERRUPT Ta Yes
58 .It PMC_CAP_INVERT Ta Yes
59 .It PMC_CAP_READ Ta Yes
60 .It PMC_CAP_PRECISE Ta \&No
61 .It PMC_CAP_SYSTEM Ta Yes
62 .It PMC_CAP_TAGGING Ta \&No
63 .It PMC_CAP_THRESHOLD Ta Yes
64 .It PMC_CAP_USER Ta Yes
65 .It PMC_CAP_WRITE Ta Yes
66 .El
67 .Ss Event Qualifiers
68 Event specifiers for AMD K8 PMCs can have the following optional
69 qualifiers:
70 .Bl -tag -width indent
71 .It Li count= Ns Ar value
72 Configure the counter to increment only if the number of configured
73 events measured in a cycle is greater than or equal to
74 .Ar value .
75 .It Li edge
76 Configure the counter to only count negated-to-asserted transitions
77 of the conditions expressed by the other fields.
78 In other words, the counter will increment only once whenever a given
79 condition becomes true, irrespective of the number of clocks during
80 which the condition remains true.
81 .It Li inv
82 Invert the sense of comparison when the
83 .Dq Li count
84 qualifier is present, making the counter to increment when the
85 number of events per cycle is less than the value specified by
86 the
87 .Dq Li count
88 qualifier.
89 .It Li mask= Ns Ar qualifier
90 Many event specifiers for AMD K8 PMCs need to be additionally
91 qualified using a mask qualifier.
92 These additional qualifiers are event-specific and are documented
93 along with their associated event specifiers below.
94 .It Li os
95 Configure the PMC to count events happening at privilege level 0.
96 .It Li usr
97 Configure the PMC to count events occurring at privilege levels 1, 2
98 or 3.
99 .El
100 .Pp
101 If neither of the
102 .Dq Li os
103 or
104 .Dq Li usr
105 qualifiers were specified, the default is to enable both.
106 .Ss AMD K8 Event Specifiers
107 The event specifiers supported on AMD K8 PMCs are:
108 .Bl -tag -width indent
109 .It Li k8-bu-cpu-clk-unhalted
110 .Pq Event 76H
111 Count the number of clock cycles when the CPU is not in the HLT or
112 STPCLK states.
113 .It Li k8-bu-fill-request-l2-miss Op Li ,mask= Ns Ar qualifier
114 .Pq Event 7EH
115 Count fill requests that missed in the L2 cache.
116 This event may be further qualified using
117 .Ar qualifier ,
118 which is a
119 .Ql +
120 separated set of the following keywords:
121 .Pp
122 .Bl -tag -width indent -compact
123 .It Li dc-fill
124 Count data cache fill requests.
125 .It Li ic-fill
126 Count instruction cache fill requests.
127 .It Li tlb-reload
128 Count TLB reloads.
129 .El
130 .Pp
131 The default is to count all types of requests.
132 .It Li k8-bu-fill-into-l2 Op Li ,mask= Ns Ar qualifier
133 .Pq Event 7FH
134 The number of lines written to and from the L2 cache.
135 The event may be further qualified by using
136 .Ar qualifier ,
137 which is a
138 .Ql +
139 separated set of the following keywords:
140 .Pp
141 .Bl -tag -width indent -compact
142 .It Li dirty-l2-victim
143 Count lines written into L2 cache due to victim writebacks from the
144 Icache or Dcache, TLB page table walks or hardware data prefetches.
145 .It Li victim-from-l2
146 Count writebacks of dirty lines from L2 to the system.
147 .El
148 .It Li k8-bu-internal-l2-request Op Li ,mask= Ns Ar qualifier
149 .Pq Event 7DH
150 Count internally generated requests to the L2 cache.
151 This event may be further qualified using
152 .Ar qualifier ,
153 which is a
154 .Ql +
155 separated set of the following keywords:
156 .Pp
157 .Bl -tag -width indent -compact
158 .It Li cancelled
159 Count cancelled requests.
160 .It Li dc-fill
161 Count data cache fill requests.
162 .It Li ic-fill
163 Count instruction cache fill requests.
164 .It Li tag-snoop
165 Count tag snoop requests.
166 .It Li tlb-reload
167 Count TLB reloads.
168 .El
169 .Pp
170 The default is to count all types of requests.
171 .It Li k8-dc-access
172 .Pq Event 40H
173 Count data cache accesses including microcode scratch pad accesses.
174 .It Li k8-dc-copyback Op Li ,mask= Ns Ar qualifier
175 .Pq Event 44H
176 Count data cache copyback operations.
177 This event may be further qualified using
178 .Ar qualifier ,
179 which is a
180 .Ql +
181 separated set of the following keywords:
182 .Pp
183 .Bl -tag -width indent -compact
184 .It Li exclusive
185 Count operations for lines in the
186 .Dq exclusive
187 state.
188 .It Li invalid
189 Count operations for lines in the
190 .Dq invalid
191 state.
192 .It Li modified
193 Count operations for lines in the
194 .Dq modified
195 state.
196 .It Li owner
197 Count operations for lines in the
198 .Dq owner
199 state.
200 .It Li shared
201 Count operations for lines in the
202 .Dq shared
203 state.
204 .El
205 .Pp
206 The default is to count operations for lines in all the
207 above states.
208 .It Li k8-dc-dcache-accesses-by-locks Op Li ,mask= Ns Ar qualifier
209 .Pq Event 4CH
210 Count data cache accesses by lock instructions.
211 This event is only available on processors of revision C or later
212 vintage.
213 This event may be further qualified using
214 .Ar qualifier ,
215 which is a
216 .Ql +
217 separated set of the following keywords:
218 .Pp
219 .Bl -tag -width indent -compact
220 .It Li accesses
221 Count data cache accesses by lock instructions.
222 .It Li misses
223 Count data cache misses by lock instructions.
224 .El
225 .Pp
226 The default is to count all accesses.
227 .It Li k8-dc-dispatched-prefetch-instructions Op Li ,mask= Ns Ar qualifier
228 .Pq Event 4BH
229 Count the number of dispatched prefetch instructions.
230 This event may be further qualified using
231 .Ar qualifier ,
232 which is a
233 .Ql +
234 separated set of the following keywords:
235 .Pp
236 .Bl -tag -width indent -compact
237 .It Li load
238 Count load operations.
239 .It Li nta
240 Count non-temporal operations.
241 .It Li store
242 Count store operations.
243 .El
244 .Pp
245 The default is to count all operations.
246 .It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-hit
247 .Pq Event 45H
248 Count L1 DTLB misses that are L2 DTLB hits.
249 .It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-miss
250 .Pq Event 46H
251 Count L1 DTLB misses that are also misses in the L2 DTLB.
252 .It Li k8-dc-microarchitectural-early-cancel-of-an-access
253 .Pq Event 49H
254 Count microarchitectural early cancels of data cache accesses.
255 .It Li k8-dc-microarchitectural-late-cancel-of-an-access
256 .Pq Event 48H
257 Count microarchitectural late cancels of data cache accesses.
258 .It Li k8-dc-misaligned-data-reference
259 .Pq Event 47H
260 Count misaligned data references.
261 .It Li k8-dc-miss
262 .Pq Event 41H
263 Count data cache misses.
264 .It Li k8-dc-one-bit-ecc-error Op Li ,mask= Ns Ar qualifier
265 .Pq Event 4AH
266 Count one bit ECC errors found by the scrubber.
267 This event may be further qualified using
268 .Ar qualifier ,
269 which is a
270 .Ql +
271 separated set of the following keywords:
272 .Pp
273 .Bl -tag -width indent -compact
274 .It Li scrubber
275 Count scrubber detected errors.
276 .It Li piggyback
277 Count piggyback scrubber errors.
278 .El
279 .Pp
280 The default is to count both kinds of errors.
281 .It Li k8-dc-refill-from-l2 Op Li ,mask= Ns Ar qualifier
282 .Pq Event 42H
283 Count data cache refills from L2 cache.
284 This event may be further qualified using
285 .Ar qualifier ,
286 which is a
287 .Ql +
288 separated set of the following keywords:
289 .Pp
290 .Bl -tag -width indent -compact
291 .It Li exclusive
292 Count operations for lines in the
293 .Dq exclusive
294 state.
295 .It Li invalid
296 Count operations for lines in the
297 .Dq invalid
298 state.
299 .It Li modified
300 Count operations for lines in the
301 .Dq modified
302 state.
303 .It Li owner
304 Count operations for lines in the
305 .Dq owner
306 state.
307 .It Li shared
308 Count operations for lines in the
309 .Dq shared
310 state.
311 .El
312 .Pp
313 The default is to count operations for lines in all the
314 above states.
315 .It Li k8-dc-refill-from-system Op Li ,mask= Ns Ar qualifier
316 .Pq Event 43H
317 Count data cache refills from system memory.
318 This event may be further qualified using
319 .Ar qualifier ,
320 which is a
321 .Ql +
322 separated set of the following keywords:
323 .Pp
324 .Bl -tag -width indent -compact
325 .It Li exclusive
326 Count operations for lines in the
327 .Dq exclusive
328 state.
329 .It Li invalid
330 Count operations for lines in the
331 .Dq invalid
332 state.
333 .It Li modified
334 Count operations for lines in the
335 .Dq modified
336 state.
337 .It Li owner
338 Count operations for lines in the
339 .Dq owner
340 state.
341 .It Li shared
342 Count operations for lines in the
343 .Dq shared
344 state.
345 .El
346 .Pp
347 The default is to count operations for lines in all the
348 above states.
349 .It Li k8-fp-cycles-with-no-fpu-ops-retired
350 .Pq Event 01H
351 Count cycles when no FPU ops were retired.
352 This event is supported in revision B and later CPUs.
353 .It Li k8-fp-dispatched-fpu-fast-flag-ops
354 .Pq Event 02H
355 Count dispatched FPU ops that use the fast flag interface.
356 This event is supported in revision B and later CPUs.
357 .It Li k8-fp-dispatched-fpu-ops Op Li ,mask= Ns Ar qualifier
358 .Pq Event 00H
359 Count the number of dispatched FPU ops.
360 This event is supported in revision B and later CPUs.
361 This event may be further qualified using
362 .Ar qualifier ,
363 which is a
364 .Ql +
365 separated set of the following keywords:
366 .Pp
367 .Bl -tag -width indent -compact
368 .It Li add-pipe-excluding-junk-ops
369 Count add pipe ops excluding junk ops.
370 .It Li add-pipe-junk-ops
371 Count junk ops in the add pipe.
372 .It Li multiply-pipe-excluding-junk-ops
373 Count multiply pipe ops excluding junk ops.
374 .It Li multiply-pipe-junk-ops
375 Count junk ops in the multiply pipe.
376 .It Li store-pipe-excluding-junk-ops
377 Count store pipe ops excluding junk ops
378 .It Li store-pipe-junk-ops
379 Count junk ops in the store pipe.
380 .El
381 .Pp
382 The default is to count all types of ops.
383 .It Li k8-fr-decoder-empty
384 .Pq Event D0H
385 Count cycles when there was nothing to dispatch (i.e., the decoder
386 was empty).
387 .It Li k8-fr-dispatch-stall-for-segment-load
388 .Pq Event D4H
389 Count dispatch stalls for segment loads.
390 .It Li k8-fr-dispatch-stall-for-serialization
391 .Pq Event D3H
392 Count dispatch stalls for serialization.
393 .It Li k8-fr-dispatch-stall-from-branch-abort-to-retire
394 .Pq Event D2H
395 Count dispatch stalls from branch abort to retiral.
396 .It Li k8-fr-dispatch-stall-when-fpu-is-full
397 .Pq Event D7H
398 Count dispatch stalls when the FPU is full.
399 .It Li k8-fr-dispatch-stall-when-ls-is-full
400 .Pq Event D8H
401 Count dispatch stalls when the load/store unit is full.
402 .It Li k8-fr-dispatch-stall-when-reorder-buffer-is-full
403 .Pq Event D5H
404 Count dispatch stalls when the reorder buffer is full.
405 .It Li k8-fr-dispatch-stall-when-reservation-stations-are-full
406 .Pq Event D6H
407 Count dispatch stalls when reservation stations are full.
408 .It Li k8-fr-dispatch-stall-when-waiting-far-xfer-or-resync-branch-pending
409 .Pq Event DAH
410 Count dispatch stalls when a far control transfer or a resync branch
411 is pending.
412 .It Li k8-fr-dispatch-stall-when-waiting-for-all-to-be-quiet
413 .Pq Event D9H
414 Count dispatch stalls when waiting for all to be quiet.
415 .\" XXX What does "waiting for all to be quiet" mean?
416 .It Li k8-fr-dispatch-stalls
417 .Pq Event D1H
418 Count all dispatch stalls.
419 .It Li k8-fr-fpu-exceptions Op Li ,mask= Ns Ar qualifier
420 .Pq Event DBH
421 Count FPU exceptions.
422 This event is supported in revision B and later CPUs.
423 This event may be further qualified using
424 .Ar qualifier ,
425 which is a
426 .Ql +
427 separated set of the following keywords:
428 .Pp
429 .Bl -tag -width indent -compact
430 .It Li sse-and-x87-microtraps
431 Count SSE and x87 microtraps.
432 .It Li sse-reclass-microfaults
433 Count SSE reclass microfaults
434 .It Li sse-retype-microfaults
435 Count SSE retype microfaults
436 .It Li x87-reclass-microfaults
437 Count x87 reclass microfaults.
438 .El
439 .Pp
440 The default is to count all types of exceptions.
441 .It Li k8-fr-interrupts-masked-cycles
442 .Pq Event CDH
443 Count cycles when interrupts were masked (by CPU RFLAGS field IF was zero).
444 .It Li k8-fr-interrupts-masked-while-pending-cycles
445 .Pq Event CEH
446 Count cycles while interrupts were masked while pending (i.e., cycles
447 when INTR was asserted while CPU RFLAGS field IF was zero).
448 .It Li k8-fr-number-of-breakpoints-for-dr0
449 .Pq Event DCH
450 Count the number of breakpoints for DR0.
451 .It Li k8-fr-number-of-breakpoints-for-dr1
452 .Pq Event DDH
453 Count the number of breakpoints for DR1.
454 .It Li k8-fr-number-of-breakpoints-for-dr2
455 .Pq Event DEH
456 Count the number of breakpoints for DR2.
457 .It Li k8-fr-number-of-breakpoints-for-dr3
458 .Pq Event DFH
459 Count the number of breakpoints for DR3.
460 .It Li k8-fr-retired-branches
461 .Pq Event C2H
462 Count retired branches including exceptions and interrupts.
463 .It Li k8-fr-retired-branches-mispredicted
464 .Pq Event C3H
465 Count mispredicted retired branches.
466 .It Li k8-fr-retired-far-control-transfers
467 .Pq Event C6H
468 Count retired far control transfers (which are always mispredicted).
469 .It Li k8-fr-retired-fastpath-double-op-instructions Op Li ,mask= Ns Ar qualifier
470 .Pq Event CCH
471 Count retired fastpath double op instructions.
472 This event is supported in revision B and later CPUs.
473 This event may be further qualified using
474 .Ar qualifier ,
475 which is a
476 .Ql +
477 separated set of the following keywords:
478 .Pp
479 .Bl -tag -width indent -compact
480 .It Li low-op-pos-0
481 Count instructions with the low op in position 0.
482 .It Li low-op-pos-1
483 Count instructions with the low op in position 1.
484 .It Li low-op-pos-2
485 Count instructions with the low op in position 2.
486 .El
487 .Pp
488 The default is to count all types of instructions.
489 .It Li k8-fr-retired-fpu-instructions Op Li ,mask= Ns Ar qualifier
490 .Pq Event CBH
491 Count retired FPU instructions.
492 This event is supported in revision B and later CPUs.
493 This event may be further qualified using
494 .Ar qualifier ,
495 which is a
496 .Ql +
497 separated set of the following keywords:
498 .Pp
499 .Bl -tag -width indent -compact
500 .It Li mmx-3dnow
501 Count MMX and 3DNow!\& instructions.
502 .It Li packed-sse-sse2
503 Count packed SSE and SSE2 instructions.
504 .It Li scalar-sse-sse2
505 Count scalar SSE and SSE2 instructions
506 .It Li x87
507 Count x87 instructions.
508 .El
509 .Pp
510 The default is to count all types of instructions.
511 .It Li k8-fr-retired-near-returns
512 .Pq Event C8H
513 Count retired near returns.
514 .It Li k8-fr-retired-near-returns-mispredicted
515 .Pq Event C9H
516 Count mispredicted near returns.
517 .It Li k8-fr-retired-resyncs
518 .Pq Event C7H
519 Count retired resyncs (non-control transfer branches).
520 .It Li k8-fr-retired-taken-branches
521 .Pq Event C4H
522 Count retired taken branches.
523 .It Li k8-fr-retired-taken-branches-mispredicted
524 .Pq Event C5H
525 Count retired taken branches that were mispredicted.
526 .It Li k8-fr-retired-taken-branches-mispredicted-by-addr-miscompare
527 .Pq Event CAH
528 Count retired taken branches that were mispredicted only due to an
529 address miscompare.
530 .It Li k8-fr-retired-taken-hardware-interrupts
531 .Pq Event CFH
532 Count retired taken hardware interrupts.
533 .It Li k8-fr-retired-uops
534 .Pq Event C1H
535 Count retired uops.
536 .It Li k8-fr-retired-x86-instructions
537 .Pq Event C0H
538 Count retired x86 instructions including exceptions and interrupts.
539 .It Li k8-ic-fetch
540 .Pq Event 80H
541 Count instruction cache fetches.
542 .It Li k8-ic-instruction-fetch-stall
543 .Pq Event 87H
544 Count cycles in stalls due to instruction fetch.
545 .It Li k8-ic-l1-itlb-miss-and-l2-itlb-hit
546 .Pq Event 84H
547 Count L1 ITLB misses that are L2 ITLB hits.
548 .It Li k8-ic-l1-itlb-miss-and-l2-itlb-miss
549 .Pq Event 85H
550 Count ITLB misses that miss in both L1 and L2 ITLBs.
551 .It Li k8-ic-microarchitectural-resync-by-snoop
552 .Pq Event 86H
553 Count microarchitectural resyncs caused by snoops.
554 .It Li k8-ic-miss
555 .Pq Event 81H
556 Count instruction cache misses.
557 .It Li k8-ic-refill-from-l2
558 .Pq Event 82H
559 Count instruction cache refills from L2 cache.
560 .It Li k8-ic-refill-from-system
561 .Pq Event 83H
562 Count instruction cache refills from system memory.
563 .It Li k8-ic-return-stack-hits
564 .Pq Event 88H
565 Count hits to the return stack.
566 .It Li k8-ic-return-stack-overflow
567 .Pq Event 89H
568 Count overflows of the return stack.
569 .It Li k8-ls-buffer2-full
570 .Pq Event 23H
571 Count load/store buffer2 full events.
572 .It Li k8-ls-locked-operation Op Li ,mask= Ns Ar qualifier
573 .Pq Event 24H
574 Count locked operations.
575 For revision C and later CPUs, the following qualifiers are supported:
576 .Pp
577 .Bl -tag -width indent -compact
578 .It Li cycles-in-request
579 Count the number of cycles in the lock request/grant stage.
580 .It Li cycles-to-complete
581 Count the number of cycles a lock takes to complete once it is
582 non-speculative and is the older load/store operation.
583 .It Li locked-instructions
584 Count the number of lock instructions executed.
585 .El
586 .Pp
587 The default is to count the number of lock instructions executed.
588 .It Li k8-ls-microarchitectural-late-cancel
589 .Pq Event 25H
590 Count microarchitectural late cancels of operations in the load/store
591 unit.
592 .It Li k8-ls-microarchitectural-resync-by-self-modifying-code
593 .Pq Event 21H
594 Count microarchitectural resyncs caused by self-modifying code.
595 .It Li k8-ls-microarchitectural-resync-by-snoop
596 .Pq Event 22H
597 Count microarchitectural resyncs caused by snoops.
598 .It Li k8-ls-retired-cflush-instructions
599 .Pq Event 26H
600 Count retired CFLUSH instructions.
601 .It Li k8-ls-retired-cpuid-instructions
602 .Pq Event 27H
603 Count retired CPUID instructions.
604 .It Li k8-ls-segment-register-load Op Li ,mask= Ns Ar qualifier
605 .Pq Event 20H
606 Count segment register loads.
607 This event may be further qualified using
608 .Ar qualifier ,
609 which is a
610 .Ql +
611 separated set of the following keywords:
612 .Bl -tag -width indent -compact
613 .It Li cs
614 Count CS register loads.
615 .It Li ds
616 Count DS register loads.
617 .It Li es
618 Count ES register loads.
619 .It Li fs
620 Count FS register loads.
621 .It Li gs
622 Count GS register loads.
623 .\" .It Li hs
624 .\" Count HS register loads.
625 .\" XXX "HS" register?
626 .It Li ss
627 Count SS register loads.
628 .El
629 .Pp
630 The default is to count all types of loads.
631 .It Li k8-nb-ht-bus0-bandwidth Op Li ,mask= Ns Ar qualifier
632 .It Li k8-nb-ht-bus1-bandwidth Op Li ,mask= Ns Ar qualifier
633 .It Li k8-nb-ht-bus2-bandwidth Op Li ,mask= Ns Ar qualifier
634 .Pq Events F6H, F7H and F8H respectively
635 Count events on the HyperTransport(tm) buses.
636 These events may be further qualified using
637 .Ar qualifier ,
638 which is a
639 .Ql +
640 separated set of the following keywords:
641 .Pp
642 .Bl -tag -width indent -compact
643 .It Li buffer-release
644 Count buffer release messages sent.
645 .It Li command
646 Count command messages sent.
647 .It Li data
648 Count data messages sent.
649 .It Li nop
650 Count nop messages sent.
651 .El
652 .Pp
653 The default is to count all types of messages.
654 .It Li k8-nb-memory-controller-bypass-saturation Op Li ,mask= Ns Ar qualifier
655 .Pq Event E4H
656 Count memory controller bypass counter saturation events.
657 This event may be further qualified using
658 .Ar qualifier ,
659 which is a
660 .Ql +
661 separated set of the following keywords:
662 .Pp
663 .Bl -tag -width indent -compact
664 .It Li dram-controller-interface-bypass
665 Count DRAM controller interface bypass.
666 .It Li dram-controller-queue-bypass
667 Count DRAM controller queue bypass.
668 .It Li memory-controller-hi-pri-bypass
669 Count memory controller high priority bypasses.
670 .It Li memory-controller-lo-pri-bypass
671 Count memory controller low priority bypasses.
672 .El
673 .It Li k8-nb-memory-controller-dram-slots-missed
674 .Pq Event E2H
675 Count memory controller DRAM command slots missed (in MemClks).
676 .It Li k8-nb-memory-controller-page-access-event Op Li ,mask= Ns Ar qualifier
677 .Pq Event E0H
678 Count memory controller page access events.
679 This event may be further qualified using
680 .Ar qualifier ,
681 which is a
682 .Ql +
683 separated set of the following keywords:
684 .Pp
685 .Bl -tag -width indent -compact
686 .It Li page-conflict
687 Count page conflicts.
688 .It Li page-hit
689 Count page hits.
690 .It Li page-miss
691 Count page misses.
692 .El
693 .Pp
694 The default is to count all types of events.
695 .It Li k8-nb-memory-controller-page-table-overflow
696 .Pq Event E1H
697 Count memory control page table overflow events.
698 .It Li k8-nb-memory-controller-turnaround Op Li ,mask= Ns Ar qualifier
699 .Pq Event E3H
700 Count memory control turnaround events.
701 This event may be further qualified using
702 .Ar qualifier ,
703 which is a
704 .Ql +
705 separated set of the following keywords:
706 .Pp
707 .Bl -tag -width indent -compact
708 .\" XXX doc is unclear whether these are cycle counts or event counts
709 .It Li dimm-turnaround
710 Count DIMM turnarounds.
711 .It Li read-to-write-turnaround
712 Count read to write turnarounds.
713 .It Li write-to-read-turnaround
714 Count write to read turnarounds.
715 .El
716 .Pp
717 The default is to count all types of events.
718 .It Li k8-nb-probe-result Op Li ,mask= Ns Ar qualifier
719 .Pq Event ECH
720 Count probe events.
721 This event may be further qualified using
722 .Ar qualifier ,
723 which is a
724 .Ql +
725 separated set of the following keywords:
726 .Pp
727 .Bl -tag -width indent -compact
728 .It Li probe-hit
729 Count all probe hits.
730 .It Li probe-hit-dirty-no-memory-cancel
731 Count probe hits without memory cancels.
732 .It Li probe-hit-dirty-with-memory-cancel
733 Count probe hits with memory cancels.
734 .It Li probe-miss
735 Count probe misses.
736 .El
737 .It Li k8-nb-sized-commands Op Li ,mask= Ns Ar qualifier
738 .Pq Event EBH
739 Count sized commands issued.
740 This event may be further qualified using
741 .Ar qualifier ,
742 which is a
743 .Ql +
744 separated set of the following keywords:
745 .Pp
746 .Bl -tag -width indent -compact
747 .It Li nonpostwrszbyte
748 .It Li nonpostwrszdword
749 .It Li postwrszbyte
750 .It Li postwrszdword
751 .It Li rdszbyte
752 .It Li rdszdword
753 .It Li rdmodwr
754 .El
755 .Pp
756 The default is to count all types of commands.
757 .El
758 .Ss Event Name Aliases
759 The following table shows the mapping between the PMC-independent
760 aliases supported by
761 .Lb libpmc
762 and the underlying hardware events used.
763 .Bl -column "branch-mispredicts" "Description"
764 .It Em Alias Ta Em Event
765 .It Li branches Ta Li k8-fr-retired-taken-branches
766 .It Li branch-mispredicts Ta Li k8-fr-retired-taken-branches-mispredicted
767 .It Li dc-misses Ta Li k8-dc-miss
768 .It Li ic-misses Ta Li k8-ic-miss
769 .It Li instructions Ta Li k8-fr-retired-x86-instructions
770 .It Li interrupts Ta Li k8-fr-taken-hardware-interrupts
771 .It Li unhalted-cycles Ta Li k8-bu-cpu-clk-unhalted
772 .El
773 .Sh SEE ALSO
774 .Xr pmc 3 ,
775 .Xr pmc.atom 3 ,
776 .Xr pmc.core 3 ,
777 .Xr pmc.core2 3 ,
778 .Xr pmc.iaf 3 ,
779 .Xr pmc.k7 3 ,
780 .Xr pmc.soft 3 ,
781 .Xr pmc.tsc 3 ,
782 .Xr pmclog 3 ,
783 .Xr hwpmc 4
784 .Sh HISTORY
785 The
786 .Nm pmc
787 library first appeared in
788 .Fx 6.0 .
789 .Sh AUTHORS
790 The
791 .Lb libpmc
792 library was written by
793 .An Joseph Koshy Aq Mt jkoshy@FreeBSD.org .