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