summaryrefslogtreecommitdiff
path: root/share/man/man4/man4.sparc64/uperf.4
blob: 8aa7ccf90125d6d0b744dff8a4b645e7f9c74743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
.\"     $OpenBSD: uperf.4,v 1.14 2007/05/31 19:19:57 jmc Exp $
.\"
.\" Copyright (c) 2002 Jason L. Wright (jason@thought.net)
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 31 2007 $
.Dt UPERF 4 sparc64
.Os
.Sh NAME
.Nm uperf
.Nd performance counters driver
.Sh SYNOPSIS
.Cd "uperf* at ebus?"
.Cd "uperf* at sbus?"
.Sh DESCRIPTION
Some UltraSPARC host bridges provide performance counters on their host
bridges.
The counters are a part of the system controller chip (usc, dsc, or qsc).
On PCI machines the system controller shows up as a device on the EBus, but
on SBus machines the system controller exists in SBus space.
The
.Nm
driver provides access to these counters via
.Xr ioctl 2 .
.Sh IOCTLS
All of the ioctl calls supported by the
.Nm
driver take the following structure as an argument:
.Bd -literal -offset indent
struct uperf_io {
	int cnt_flags;
	int cnt_src0;
	int cnt_src1;
	u_int32_t cnt_val0;
	u_int32_t cnt_val1;
};
.Ed
.Pp
The
.Fa cnt_flags
field specifies which counters are being operated on and is a bit mask
of
.Fa UPERF_CNT0
and/or
.Fa UPERF_CNT1 .
.Pp
The
.Fa cnt_src0
and
.Fa cnt_src1
fields specify the source for the counter.
Not all counters support monitoring all sources and specifying an invalid
source for a counter to monitor will result in an error.
The sources are specified below:
.Bl -column "XXXXXXXXXXXXXX" "description" -offset indent
.It Em UPERFSRC_SYSCK Ta "system clock ticks"
.It Em UPERFSRC_PRALL Ta "all p-requests"
.It Em UPERFSRC_PRP0 Ta "p-requests from processor 0"
.It Em UPERFSRC_PRU2S Ta "p-requests from the U2S"
.It Em UPERFSRC_UPA128 Ta "cycles UPA 128 bit data is busy"
.It Em UPERFSRC_UPA64 Ta "cycles UPA 64 bit data is busy"
.It Em UPERFSRC_PIOS Ta "cycles stalled during PIO"
.It Em UPERFSRC_MEMRI Ta "memory requests issued"
.It Em UPERFSRC_MCBUSY Ta "cycles memory controller is busy"
.It Em UPERFSRC_PXSH Ta "stall cycles due to pending transaction scoreboard hit"
.It Em UPERFSRC_P0CWMR Ta "coherent write miss requests, processor 0"
.It Em UPERFSRC_P1CWMR Ta "coherent write miss requests, processor 1"
.It Em UPERFSRC_CIT Ta "coherent intervention transactions"
.It Em UPERFSRC_U2SDAT Ta "data transactions on U2S"
.It Em UPERFSRC_CRXI Ta "coherent read transactions issued"
.It Em UPERFSRC_RDP0 Ta "read requests, processor 0"
.It Em UPERFSRC_P0CRMR Ta "coherent read misses, processor 0"
.It Em UPERFSRC_P0PIO Ta "PIO accesses, processor 0"
.It Em UPERFSRC_MEMRC Ta "memory requests completed"
.It Em UPERFSRC_P1RR Ta "read requests, processor 1"
.It Em UPERFSRC_CRMP1 Ta "coherent read misses, processor 1"
.It Em UPERFSRC_PIOP1 Ta "PIO accesses, processor 1"
.It Em UPERFSRC_CWXI Ta "coherent write transactions issued"
.It Em UPERFSRC_RP0 Ta "read requests, processor 0"
.It Em UPERFSRC_SDVRA Ta "streaming DVMA read transfers, PCI bus A"
.It Em UPERFSRC_SDVWA Ta "streaming DVMA write transfers, PCI bus A"
.It Em UPERFSRC_CDVRA Ta "consistent DVMA read transfers, PCI bus A"
.It Em UPERFSRC_CDVWA Ta "consistent DVMA write transfers, PCI bus A"
.It Em UPERFSRC_SBMA Ta "streaming buffer misses, PCI bus A"
.It Em UPERFSRC_DVA Ta "DVMA cycles, PCI bus A"
.It Em UPERFSRC_DVWA Ta "words transferred via DVMA, PCI bus A"
.It Em UPERFSRC_PIOA Ta "cycles consumed by PIO, bus A"
.It Em UPERFSRC_SDVRB Ta "streaming DVMA read transfers, PCI bus B"
.It Em UPERFSRC_SDVWB Ta "streaming DVMA write transfers, PCI bus B"
.It Em UPERFSRC_CDVRB Ta "consistent DVMA read transfers, PCI bus B"
.It Em UPERFSRC_CDVWB Ta "consistent DVMA write transfers, PCI bus B"
.It Em UPERFSRC_SBMB Ta "streaming buffer misses, PCI bus B"
.It Em UPERFSRC_DVB Ta "DVMA cycles, PCI bus B"
.It Em UPERFSRC_DVWB Ta "words transferred via DVMA, PCI bus B"
.It Em UPERFSRC_PIOB Ta "cycles consumed by PIO, bus B"
.It Em UPERFSRC_TLBMISS Ta "TLB misses"
.It Em UPERFSRC_NINTRS Ta "interrupts"
.It Em UPERFSRC_INACK Ta "interrupt NACKS on UPA"
.It Em UPERFSRC_PIOR Ta "PIO read transfers"
.It Em UPERFSRC_PIOW Ta "PIO write transfers"
.It Em UPERFSRC_MERGE Ta "merge buffer transactions"
.It Em UPERFSRC_TBLA Ta "DMA requests retried due to tablewalks, PCI bus A"
.It Em UPERFSRC_STCA Ta "DMA requests retries due to STC, PCI bus A"
.It Em UPERFSRC_TBLB Ta "DMA requests retries due to tablewalks, PCI bus B"
.It Em UPERFSRC_STCB Ta "DMA requests retries due to STC, PCI bus B"
.El
.Pp
The
.Fa cnt_val0
and
.Fa cnt_val1
contain the values fetched for the counters.
Software using this interface should be prepared to handle the counters
rolling over.
.Pp
The
.Nm
device responds to the following
.Xr ioctl 2
calls, which are defined in
.Aq Pa dev/sun/uperfio.h .
.Bl -tag -width UPIO_GCNTSRC
.It Dv UPIO_GCNTSRC
.Pq Li "struct uperf_io"
Retrieve the source the counters are monitoring.
The
.Fa cnt_flags
is a bit mask for which of the counters is to be fetched.
The result is returned in
.Fa cnt_src0
and/or
.Fa cnt_src1 .
.It Dv UPIO_SCNTSRC
.Pq Li "struct uperf_io"
Set the source the counters should monitor.
This call also clears the current value of the counters that are set.
The
.Fa cnt_flags
is a bit mask for which of the counters is to be set.
The
.Fa cnt_src0
and/or
.Fa cnt_src1
fields specify the source to be set for the respective counter.
.It Dv UPIO_CLRCNT
.Pq Li "struct uperf_io"
Clear the counters specified in
.Fa cnt_flags .
.It Dv UPIO_GETCNT
.Pq Li "struct uperf_io"
Retrieve the value for the counters specified in
.Fa cnt_flags .
The values are returned in
.Fa cnt_val0
and/or
.Fa cnt_val1 .
.El
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr ebus 4 ,
.Xr intro 4 ,
.Xr sbus 4
.Sh HISTORY
The
.Nm
driver was first supported in
.Ox 3.1 .
.Sh AUTHORS
The driver was written by
.An Jason Wright Aq jason@thought.net .