xref: /freebsd/lib/libpmc/pmc.iaf.3 (revision 4a5216a6dc0c3ce4cf5f2d3ee8af0c3ff3402c4f)
1.\" Copyright (c) 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 Joseph Koshy ``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 Joseph Koshy 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 3, 2008
27.Os
28.Dt PMC.IAF 3
29.Sh NAME
30.Nm pmc.iaf
31.Nd measurement events for
32.Tn Intel
33fixed function performance counters.
34.Sh LIBRARY
35.Lb libpmc
36.Sh SYNOPSIS
37.In pmc.h
38.Sh DESCRIPTION
39.Tn Intel
40fixed-function PMCs are present in CPUs that conform to version 2 or
41later of the
42.Tn Intel
43Performance Measurement Architecture.
44Each fixed-function PMC measures a specific hardware event.
45The number of fixed-function PMCs implemented in a CPU can vary.
46The number of fixed-function PMCs present can be determined at runtime
47by using function
48.Xr pmc_cpuinfo 3 .
49.Pp
50Intel fixed-function PMCs are documented in
51.Rs
52.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
53.%T "Volume 3: System Programming Guide"
54.%N "Order Number 253669-027US"
55.%D July 2008
56.%Q "Intel Corporation"
57.Re
58.Pp
59.Ss PMC Capabilities
60Fixed-function PMCs support the following capabilities:
61.Bl -column "PMC_CAP_INTERRUPT" "Support"
62.It Em Capability Ta Em Support
63.It PMC_CAP_CASCADE Ta \&No
64.It PMC_CAP_EDGE Ta \&No
65.It PMC_CAP_INTERRUPT Ta Yes
66.It PMC_CAP_INVERT Ta \&No
67.It PMC_CAP_READ Ta Yes
68.It PMC_CAP_PRECISE Ta \&No
69.It PMC_CAP_SYSTEM Ta Yes
70.It PMC_CAP_TAGGING Ta \&No
71.It PMC_CAP_THRESHOLD Ta \&No
72.It PMC_CAP_USER Ta Yes
73.It PMC_CAP_WRITE Ta Yes
74.El
75.Ss Event Qualifiers (Fixed Function PMCs)
76These PMCs support the following modifiers:
77.Bl -tag -width indent
78.It Li os
79Configure the PMC to count events occurring at ring level 0.
80.It Li usr
81Configure the PMC to count events occurring at ring levels 1, 2
82or 3.
83.El
84.Pp
85If neither of the
86.Dq Li os
87or
88.Dq Li usr
89qualifiers are specified, the default is to enable both.
90.Ss Event Specifiers (Fixed Function PMCs)
91The fixed function PMCs are selectable using the following
92event names:
93.Bl -tag -width indent
94.It Li FIXED.INSTR_RETIRED.ANY
95.Pq Fixed Function Counter 0
96The number of instructions retired.
97.It Li FIXED.CPU_CLK_UNHALTED.CORE
98.Pq Fixed Function Counter 1
99The number of core cycles for which the core is not halted.
100.It Li FIXED.CPU_CLK_UNHALTED.REF
101.Pq Fixed Function Counter 2
102The number of reference cycles for which the core is not halted.
103.El
104.Sh SEE ALSO
105.Xr pmc 3 ,
106.Xr pmc.atom 3 ,
107.Xr pmc.core 3 ,
108.Xr pmc.core2 3 ,
109.Xr pmc.k7 3 ,
110.Xr pmc.k8 3 ,
111.Xr pmc.p4 3 ,
112.Xr pmc.p5 3 ,
113.Xr pmc.p6 3 ,
114.Xr pmc.tsc 3 ,
115.Xr pmc_cpuinfo 3 ,
116.Xr pmclog 3 ,
117.Xr hwpmc 4
118.Sh HISTORY
119The
120.Nm pmc
121library first appeared in
122.Fx 6.0 .
123.Sh AUTHORS
124The
125.Lb libpmc
126library was written by
127.An "Joseph Koshy"
128.Aq jkoshy@FreeBSD.org .
129