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