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