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