8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / trapstat.1m
blob5ad30a6ba99f8c521663f94ad1d80c1bdea0b9e8
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH TRAPSTAT 1M "April 9, 2016"
7 .SH NAME
8 trapstat \- report trap statistics
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/trapstat\fR [\fB-t\fR | \fB-T\fR | \fB-e\fR \fIentry\fR]
13      [\fB-C\fR \fIprocessor_set_id\fR | \fB-c\fR \fIcpulist\fR] [\fB-P\fR] [\fB-a\fR]
14      [\fB-r\fR \fIrate\fR] [ [\fIinterval\fR [\fIcount\fR]] | \fIcommand\fR | [\fIargs\fR]]
15 .fi
17 .LP
18 .nf
19 \fB/usr/sbin/trapstat\fR \fB-l\fR
20 .fi
22 .SH DESCRIPTION
23 .LP
24 The \fBtrapstat\fR utility gathers and displays run-time trap statistics on
25 UltraSPARC-based systems. The default output is a table of trap types and
26 \fBCPU\fR \fBID\fRs, with each row of the table denoting a trap type and each
27 column of the table denoting a \fBCPU\fR. If standard output is a terminal, the
28 table contains as many columns of data as can fit within the terminal width; if
29 standard output is not a terminal, the table contains at most six columns of
30 data. By default, data is gathered and displayed for all \fBCPU\fRs; if the
31 data cannot fit in a single table, it is printed across multiple tables. The
32 set of \fBCPU\fRs for which data is gathered and displayed can be optionally
33 specified with the \fB-c\fR or \fB-C\fR option.
34 .sp
35 .LP
36 Unless the \fB-r\fR option or the \fB-a\fR option is specified, the value
37 displayed in each entry of the table corresponds to the number of traps per
38 second. If the \fB-r\fR option is specified, the value corresponds to the
39 number of traps over the interval implied by the specified sampling rate; if
40 the \fB-a\fR option is specified, the value corresponds to the accumulated
41 number of traps since the invocation of \fBtrapstat\fR.
42 .sp
43 .LP
44 By default, \fBtrapstat\fR displays data once per second, and runs
45 indefinitely; both of these behaviors can be optionally controlled with the
46 \fIinterval\fR and \fIcount\fR parameters, respectively. The \fIinterval\fR is
47 specified in seconds; the \fIcount\fR indicates the number of intervals to be
48 executed before exiting. Alternatively, \fBcommand\fR can be specified, in
49 which case \fBtrapstat\fR executes the provided command and continues to run
50 until the command exits. A positive integer is assumed to be an \fIinterval\fR;
51 if the desired \fB\fIcommand\fR\fR cannot be distinguished from an integer, the
52 full path of \fIcommand\fR must be specified.
53 .sp
54 .LP
55 UltraSPARC I (obsolete), II, and III handle translation lookaside buffer (TLB)
56 misses by trapping to the operating system. TLB miss traps can be a significant
57 component of overall system performance for some workloads; the \fB-t\fR option
58 provides in-depth information on these traps. When run with this option,
59 \fBtrapstat\fR displays both the rate of TLB miss traps \fI\fR and the
60 percentage of time spent processing those traps. Additionally, TLB misses that
61 hit in the translation storage buffer (TSB) are differentiated from TLB misses
62 that further miss in the TSB. (The TSB is a software structure used as a
63 translation entry cache to allow the TLB to be quickly filled; it is discussed
64 in detail in the \fIUltraSPARC II User's Manual\fR.) The TLB and TSB miss
65 information is further broken down into user- and kernel-mode misses.
66 .sp
67 .LP
68 Workloads with working sets that exceed the TLB reach may spend a significant
69 amount of time missing in the TLB. To accommodate such workloads, the operating
70 system supports multiple page sizes: larger page sizes increase the effective
71 TLB reach and thereby reduce the number of TLB misses. To provide insight into
72 the relationship between page size and TLB miss rate, \fBtrapstat\fR optionally
73 provides in-depth TLB miss information broken down by page size using the
74 \fB-T\fR option. The information provided by the \fB-T\fR option is a superset
75 of that provided by the \fB-t\fR option; only one of \fB-t\fR and \fB-T\fR can
76 be specified.
77 .SH OPTIONS
78 .LP
79 The following options are supported:
80 .sp
81 .ne 2
82 .na
83 \fB\fB-a\fR\fR
84 .ad
85 .RS 24n
86 Displays the number of traps as accumulating, monotonically increasing values
87 instead of per-second or per-interval rates.
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fB-c\fR \fIcpulist\fR \fR
94 .ad
95 .RS 24n
96 Enables \fBtrapstat\fR only on the \fBCPU\fRs specified by \fIcpulist\fR.
97 .sp
98 \fIcpulist\fR can be a single processor \fBID\fR (for example, \fB4\fR), a
99 range of processor\fB ID\fRs (for example, \fB4-6\fR), or a comma separated
100 list of processor\fB ID\fRs or processor \fBID\fR ranges (for example,
101 \fB4,5,6\fR or \fB4,6-8\fR).
105 .ne 2
107 \fB\fB-C\fR \fIprocessor_set_id\fR \fR
109 .RS 24n
110 Enables \fBtrapstat\fR only on the \fBCPU\fRs in the processor set specified by
111 \fIprocessor_set_id\fR.
113 \fBtrapstat\fR modifies its output to always reflect the \fBCPU\fRs in the
114 specified processor set. If a \fBCPU\fR is added to the set, \fBtrapstat\fR
115 modifies its output to include the added \fBCPU\fR; if a \fBCPU\fR is removed
116 from the set, \fBtrapstat\fR modifies its output to exclude the removed CPU. At
117 most one processor set can be specified.
121 .ne 2
123 \fB\fB-e\fR \fIentrylist\fR \fR
125 .RS 24n
126 Enables \fBtrapstat\fR only for the trap table entry or entries specified by
127 \fIentrylist\fR. A trap table entry can be specified by trap number or by trap
128 name (for example, the level-10 trap can be specified as \fB74\fR, \fB0x4A\fR,
129 \fB0x4a\fR, or \fBlevel-10\fR).
131 \fIentrylist\fR can be a single trap table entry or a comma separated list of
132 trap table entries. If the specified trap table entry is not valid,
133 \fBtrapstat\fR prints a table of all valid trap table entries and values. A
134 list of valid trap table entries is also found in \fIThe SPARC Architecture
135 Manual, Version 9\fR and the \fISun Microelectronics UltraSPARC II User's
136 Manual.\fR If the parsable option (\fB-P\fR) is specified in addition to the
137 \fB-e\fR option, the format of the data is as follows:
142 c c
143 l l .
144 Field   Contents
145 1       Timestamp (nanoseconds since start)
146 2       CPU ID
147 3       Trap number (in hexadecimal)
148 4       Trap name
149 5       Trap rate per interval
152 Each field is separated with whitespace. If the format is modified, it will be
153 modified by adding potentially new fields beginning with field 6; exant fields
154 will remain unchanged.
158 .ne 2
160 \fB\fB-l\fR \fR
162 .RS 24n
163 Lists trap table entries. By default, a table is displayed containing all valid
164 trap numbers, their names and a brief description. The trap name is used in
165 both the default output and in the \fIentrylist\fR parameter for the \fB-e\fR
166 argument. If the parsable option (\fB-P\fR) is specified in addition to the
167 \fB-l\fR option, the format of the data is as follows:
172 c c
173 l l .
174 Field   Contents
175 1       Trap number in hexadecimal
176 2       Trap number in decimal
177 3       Trap name
178 Remaining       Trap description
184 .ne 2
186 \fB\fB-P\fR \fR
188 .RS 24n
189 Generates parsable output. When run without other data gathering modifying
190 options (that is, \fB-e\fR, \fB-t\fR or \fB-T\fR), \fBtrapstat\fR's the
191 parsable output has the following format:
196 c c
197 l l .
198 Field   Contents
199 1       Timestamp (nanoseconds since start)
200 2       CPU ID
201 3       Trap number (in hexadecimal)
202 4       Trap name
203 5       Trap rate per interval
206 Each field is separated with whitespace. If the format is modified, it will be
207 modified by adding potentially new fields beginning with field 6; extant fields
208 will remain unchanged.
212 .ne 2
214 \fB\fB-r\fR \fIrate\fR \fR
216 .RS 24n
217 Explicitly sets the sampling rate to be \fIrate\fR samples per second. If this
218 option is specified, \fBtrapstat\fR's output changes from a traps-per-second to
219 traps-per-sampling-interval.
223 .ne 2
225 \fB\fB-t\fR\fR
227 .RS 24n
228 Enables TLB statistics.
230 A table is displayed with four principal columns of data: \fIitlb-miss\fR,
231 \fIitsb-miss\fR, \fIdtlb-miss\fR, and \fIdtsb-miss\fR. The columns contain both
232 the rate of the corresponding event and the percentage of \fBCPU\fR time spent
233 processing the event. The percentage of \fBCPU\fR time is given only in terms
234 of a single \fBCPU\fR. The rows of the table correspond to \fBCPU\fRs, with
235 each \fBCPU\fR consuming two rows: one row for user-mode events (denoted with
236 \fBu\fR) and one row for kernel-mode events (denoted with \fBk\fR). For each
237 row, the percentage of \fBCPU\fR time is totalled and displayed in the
238 rightmost column. The \fBCPU\fRs are delineated with a solid line. If the
239 parsable option (\fB-P\fR) is specified in addition to the \fB-t\fR option, the
240 format of the data is as follows:
245 c c
246 l l .
247 Field   Contents
248 1       Timestamp (nanoseconds since start)
249 2       CPU ID
250 3       Mode (\fBk\fR denotes kernel, \fBu\fR denotes user)
251 4       I-TLB misses
252 5       Percentage of time in I-TLB miss handler
253 6       I-TSB misses
254 7       Percentage of time in I-TSB miss handler
255 8       D-TLB misses
256 9       Percentage of time in D-TLB miss handler
257 10      D-TSB misses
258 11      Percentage of time in D-TSB miss handler
261 Each field is separated with whitespace. If the format is modified, it will be
262 modified by adding potentially new fields beginning with field 12; extant
263 fields will remain unchanged.
267 .ne 2
269 \fB\fB-T\fR \fR
271 .RS 24n
272 Enables \fBTLB\fR statistics, with page size information. As with the \fB-t\fR
273 option, a table is displayed with four principal columns of data:
274 \fIitlb-miss\fR, \fIitsb-miss\fR, \fIdtlb-miss\fR, and \fIdtsb-miss\fR. The
275 columns contain both the absolute number of the corresponding event, and the
276 percentage of \fBCPU\fR time spent processing the event. The percentage of
277 \fBCPU\fR time is given only in terms of a single \fBCPU\fR. The rows of the
278 table correspond to \fBCPU\fRs, with each \fBCPU\fR consuming two sets of rows:
279 one set for user-level events (denoted with \fBu\fR) and one set for
280 kernel-level events (denoted with \fBk\fR). Each set, in turn, contains as many
281 rows as there are page sizes supported (see \fBgetpagesizes\fR(3C)). For each
282 row, the percentage of \fBCPU\fR time is totalled and displayed in the
283 right-most column. The two sets are delineated with a dashed line; CPUs are
284 delineated with a solid line. If the parsable option (\fB-P\fR) is specified in
285 addition to the \fB-T\fR option, the format of the data is as follows:
290 c c
291 l l .
292 Field   Contents
293 1       Timestamp (nanoseconds since start)
294 2       CPU ID
295 3       Mode \fBk\fR denotes kernel, \fBu\fR denotes user)
296 4       Page size, in decimal
297 5       I-TLB misses
298 6       Percentage of time in I-TLB miss handler
299 7       I-TSB misses
300 8       Percentage of time in I-TSB miss handler
301 9       D-TLB misses
302 10      Percentage of time in D-TLB miss handler
303 11      D-TSB misses
304 12      Percentage of time in D-TSB miss handler
307 Each field is separated with whitespace. If the format is modified, it will be
308 modified by adding potentially new fields beginning with field 13; extant
309 fields will remain unchanged.
312 .SH EXAMPLES
314 \fBExample 1 \fRUsing \fBtrapstat\fR Without Options
317 When run without options, \fBtrapstat\fR displays a table of trap types and
318 CPUs. At most six columns can fit in the default terminal width; if (as in this
319 example) there are more than six CPUs, multiple tables are displayed:
322 .in +2
324 example# \fBtrapstat\fR
325 vct  name               |     cpu0     cpu1     cpu4     cpu5     cpu8     cpu9
326 ------------------------+------------------------------------------------------
327  24 cleanwin            |     6446     4837     6368     2153     2623     1321
328  41 level-1             |      100        0        0        0        1        0
329  44 level-4             |        0        1        1        1        0        0
330  45 level-5             |        0        0        0        0        0        0
331  47 level-7             |        0        0        0        0        9        0
332  49 level-9             |      100      100      100      100      100      100
333  4a level-10            |      100        0        0        0        0        0
334  4d level-13            |        6       10        7       16       13       11
335  4e level-14            |      100        0        0        0        1        0
336  60 int-vec             |     2607     2740     2642     2922     2920     3033
337  64 itlb-miss           |     3129     2475     3167     1037     1200      569
338  68 dtlb-miss           |   121061    86162   109838    37386    45639    20269
339  6c dtlb-prot           |      997      847     1061      379      406      184
340  84 spill-user-32       |     2809     2133     2739   200806   332776   454504
341  88 spill-user-64       |    45819   207856    93487   228529    68373    77590
342  8c spill-user-32-cln   |      784      561      767      274      353      215
343  90 spill-user-64-cln   |        9       37       17       39       12       13
344  98 spill-kern-64       |    62913    50145    63869    21916    28431    11738
345  a4 spill-asuser-32     |     1327      947     1288      460      572      335
346  a8 spill-asuser-64     |       26       48       18       54       10       14
347  ac spill-asuser-32-cln |     4580     3599     4555     1538     1978      857
348  b0 spill-asuser-64-cln |       26        0        0        2        0        0
349  c4 fill-user-32        |     2862     2161     2798   191746   318115   435850
350  c8 fill-user-64        |    45813   197781    89179   217668    63905    74281
351  cc fill-user-32-cln    |     3802     2833     3733    10153    16419    19475
352  d0 fill-user-64-cln    |      329    10105     4873    10603     4235     3649
353  d8 fill-kern-64        |    62519    49943    63611    21824    28328    11693
354 108 syscall-32          |     2285     1634     2278      737      957      383
355 126 self-xcall          |      100        0        0        0        0        0
357 vct  name               |    cpu12    cpu13    cpu14    cpu15
358 ------------------------+------------------------------------
359  24 cleanwin            |     5435     4232     6302     6104
360  41 level-1             |        0        0        0        0
361  44 level-4             |        2        0        0        1
362  45 level-5             |        0        0        0        0
363  47 level-7             |        0        0        0        0
364  49 level-9             |      100      100      100      100
365  4a level-10            |        0        0        0        0
366  4d level-13            |       15       11       22       11
367  4e level-14            |        0        0        0        0
368  60 int-vec             |     2813     2833     2738     2714
369  64 itlb-miss           |     2636     1925     3133     3029
370  68 dtlb-miss           |    90528    70639   107786   103425
371  6c dtlb-prot           |      819      675      988      954
372  84 spill-user-32       |   175768    39933     2811     2742
373  88 spill-user-64       |        0   241348    96907   118298
374  8c spill-user-32-cln   |      681      513      753      730
375  90 spill-user-64-cln   |        0       42       16       20
376  98 spill-kern-64       |    52158    40914    62305    60141
377  a4 spill-asuser-32     |     1113      856     1251     1208
378  a8 spill-asuser-64     |        0       64       16       24
379  ac spill-asuser-32-cln |     3816     2942     4515     4381
380  b0 spill-asuser-64-cln |        0        0        0        0
381  c4 fill-user-32        |   170744    38444     2876     2784
382  c8 fill-user-64        |        0   230381    92941   111694
383  cc fill-user-32-cln    |     8550     3790     3612     3553
384  d0 fill-user-64-cln    |        0    10726     4495     5845
385  d8 fill-kern-64        |    51968    40760    62053    59922
386 108 syscall-32          |     1839     1495     2144     2083
387 126 self-xcall          |        0        0        0        0
389 .in -2
393 \fBExample 2 \fRUsing \fBtrapset\fR with CPU Filtering
396  The \fB-c\fR option can be used to limit the \fBCPU\fRs on which
397 \fBtrapstat\fR is enabled. This example limits \fBCPU 1\fR and \fBCPU\fRs
398 \fB12\fR through \fB15\fR.
401 .in +2
403 example# \fBtrapstat -c 1,12-15\fR
406 vct  name               |     cpu1    cpu12    cpu13    cpu14    cpu15
407 ------------------------+---------------------------------------------
408  24 cleanwin            |     6923     3072     2500     3518     2261
409  44 level-4             |        3        0        0        1        1
410  49 level-9             |      100      100      100      100      100
411  4d level-13            |       23        8       14       19       14
412  60 int-vec             |     2559     2699     2752     2688     2792
413  64 itlb-miss           |     3296     1548     1174     1698     1087
414  68 dtlb-miss           |   114788    54313    43040    58336    38057
415  6c dtlb-prot           |     1046      549      417      545      370
416  84 spill-user-32       |    66551    29480   301588    26522   213032
417  88 spill-user-64       |        0   318652   111239   299829   221716
418  8c spill-user-32-cln   |      856      347      331      416      293
419  90 spill-user-64-cln   |        0       55       21       59       39
420  98 spill-kern-64       |    66464    31803    24758    34004    22277
421  a4 spill-asuser-32     |     1423      569      560      698      483
422  a8 spill-asuser-64     |        0       74       32       98       46
423  ac spill-asuser-32-cln |     4875     2250     1728     2384     1584
424  b0 spill-asuser-64-cln |        0        2        0        1        0
425  c4 fill-user-32        |    64193    28418   287516    27055   202093
426  c8 fill-user-64        |        0   305016   106692   288542   210654
427  cc fill-user-32-cln    |     6733     3520    15185     2396    12035
428  d0 fill-user-64-cln    |        0    13226     3506    12933    11032
429  d8 fill-kern-64        |    66220    31680    24674    33892    22196
430 108 syscall-32          |     2446      967      817     1196      755
432 .in -2
436 \fBExample 3 \fRUsing \fBtrapstat\fR with TLB Statistics
439 The \fB-t\fR option displays in-depth \fBTLB\fR statistics, including the
440 amount of time spent performing \fBTLB\fR miss processing. The following
441 example shows that the machine is spending 14.1 percent of its time just
442 handling D-TLB misses:
445 .in +2
447 example# \fBtrapstat -t\fR
448 cpu m| itlb-miss %tim itsb-miss %tim | dtlb-miss %tim dtsb-miss %tim |%tim
449 -----+-------------------------------+-------------------------------+----
450   0 u|      2571  0.3         0  0.0 |     10802  1.3         0  0.0 | 1.6
451   0 k|         0  0.0         0  0.0 |    106420 13.4       184  0.1 |13.6
452 -----+-------------------------------+-------------------------------+----
453   1 u|      3069  0.3         0  0.0 |     10983  1.2       100  0.0 | 1.6
454   1 k|        27  0.0         0  0.0 |    106974 12.6        19  0.0 |12.7
455 -----+-------------------------------+-------------------------------+----
456   2 u|      3033  0.3         0  0.0 |     11045  1.2       105  0.0 | 1.6
457   2 k|        43  0.0         0  0.0 |    107842 12.7       108  0.0 |12.8
458 -----+-------------------------------+-------------------------------+----
459   3 u|      2924  0.3         0  0.0 |     10380  1.2       121  0.0 | 1.6
460   3 k|        54  0.0         0  0.0 |    102682 12.2        16  0.0 |12.2
461 -----+-------------------------------+-------------------------------+----
462   4 u|      3064  0.3         0  0.0 |     10832  1.2       120  0.0 | 1.6
463   4 k|        31  0.0         0  0.0 |    107977 13.0       236  0.1 |13.1
464 =====+===============================+===============================+====
465  ttl |     14816  0.3         0  0.0 |    585937 14.1      1009  0.0 |14.5
467 .in -2
471 \fBExample 4 \fRUsing \fBtrapstat\fR with TLB Statistics and Page Size
472 Information
475 By specifying the \fB-T\fR option, \fBtrapstat\fR shows \fBTLB\fR misses broken
476 down by page size. In this example, CPU 0 is spending 7.9 percent of its time
477 handling user-mode TLB misses on 8K pages, and another 2.3 percent of its time
478 handling user-mode TLB misses on 64K pages.
481 .in +2
483 example# \fBtrapstat -T -c 0\fR
484 cpu m size| itlb-miss %tim itsb-miss %tim | dtlb-miss %tim dtsb-miss %tim |%tim
485 ----------+-------------------------------+-------------------------------+----
486   0 u   8k|      1300  0.1        15  0.0 |    104897  7.9        90  0.0 | 8.0
487   0 u  64k|         0  0.0         0  0.0 |     29935  2.3         7  0.0 | 2.3
488   0 u 512k|         0  0.0         0  0.0 |      3569  0.2         2  0.0 | 0.2
489   0 u   4m|         0  0.0         0  0.0 |       233  0.0         2  0.0 | 0.0
490 - - - - - + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + - -
491   0 k   8k|        13  0.0         0  0.0 |     71733  6.5       110  0.0 | 6.5
492   0 k  64k|         0  0.0         0  0.0 |         0  0.0         0  0.0 | 0.0
493   0 k 512k|         0  0.0         0  0.0 |         0  0.0       206  0.1 | 0.1
494   0 k   4m|         0  0.0         0  0.0 |         0  0.0         0  0.0 | 0.0
495 ==========+===============================+===============================+====
496       ttl |      1313  0.1        15  0.0 |    210367 17.1       417  0.2 |17.5
498 .in -2
502 \fBExample 5 \fRUsing \fBtrapstat\fR with Entry Filtering
505 By specifying the \fB-e\fR option, \fBtrapstat\fR displays statistics for only
506 specific trap types. Using this option minimizes the probe effect when seeking
507 specific data. This example yields statistics for only the \fIdtlb-prot\fR and
508 \fIsyscall-32\fR traps on CPUs 12 through 15:
511 .in +2
513 example# \fBtrapstat -e dtlb-prot,syscall-32 -c 12-15\fR
514 vct  name               |    cpu12    cpu13    cpu14    cpu15
515 ------------------------+------------------------------------
516  6c dtlb-prot           |      817      754     1018      560
517 108 syscall-32          |     1426     1647     2186     1142
519 vct  name               |    cpu12    cpu13    cpu14    cpu15
520 ------------------------+------------------------------------
521  6c dtlb-prot           |     1085      996      800      707
522 108 syscall-32          |     2578     2167     1638     1452
524 .in -2
528 \fBExample 6 \fRUsing \fBtrapstat\fR with a Higher Sampling Rate
531 The following example uses the \fB-r\fR option to specify a sampling rate of
532 1000 samples per second, and filter only for the level-10 trap. Additionally,
533 specifying the \fB-P\fR option yields parsable output.
537 Notice the timestamp difference between the level-10 events: 9,998,000
538 nanoseconds and 10,007,000 nanoseconds. These level-10 events correspond to the
539 system clock, which by default ticks at 100 hertz (that is, every 10,000,000
540 nanoseconds).
543 .in +2
545 example# \fBtrapstat -e level-10 -P -r 1000\fR
546 1070400 0 4a level-10 0
547 2048600 0 4a level-10 0
548 3030400 0 4a level-10 1
549 4035800 0 4a level-10 0
550 5027200 0 4a level-10 0
551 6027200 0 4a level-10 0
552 7027400 0 4a level-10 0
553 8028200 0 4a level-10 0
554 9026400 0 4a level-10 0
555 10029600 0 4a level-10 0
556 11028600 0 4a level-10 0
557 12024000 0 4a level-10 0
558 13028400 0 4a level-10 1
559 14031200 0 4a level-10 0
560 15027200 0 4a level-10 0
561 16027600 0 4a level-10 0
562 17025000 0 4a level-10 0
563 18026000 0 4a level-10 0
564 19027800 0 4a level-10 0
565 20025600 0 4a level-10 0
566 21025200 0 4a level-10 0
567 22025000 0 4a level-10 0
568 23035400 0 4a level-10 1
569 24027400 0 4a level-10 0
570 25026000 0 4a level-10 0
571 26027000 0 4a level-10 0
573 .in -2
576 .SH ATTRIBUTES
578 See \fBattributes\fR(5) for descriptions of the following attributes:
583 box;
584 c c
585 l l .
586 ATTRIBUTE TYPE  ATTRIBUTE VALUE
587 Interface Stability     
588     Human Readable Output       Unstable
589     Parsable Output     Evolving
592 .SH SEE ALSO
594 \fBlockstat\fR(1M), \fBpmap\fR(1), \fBpsrset\fR(1M), \fBpsrinfo\fR(1M),
595 \fBpbind\fR(1M), \fBppgsz\fR(1), \fBgetpagesizes\fR(3C)
598 \fISun Microelectronics UltraSPARC II User's Manual,\fR January 1997, STP1031,
601 \fIThe SPARC Architecture Manual, Version 9,\fR 1994, Prentice-Hall.
602 .SH NOTES
604 When enabled, \fBtrapstat\fR induces a varying probe effect, depending on the
605 type of information collected. While the precise probe effect depends upon the
606 specifics of the hardware, the following table can be used as a rough guide:
611 c c
612 l l .
613 Option  Approximate probe effect
614 default 3-5% per trap
615 \fB-e\fR        3-5% per specified trap
616 \fB-t\fR, \fB-T\fR      T{
617 40-45% per TLB miss trap hitting in the TSB, 25-30% per TLB miss trap missing in the TSB
623 These probe effects are \fIper trap\fR not for the system as a whole. For
624 example, running \fBtrapstat\fR with the default options on a system that
625 spends 7% of total time handling traps induces a performance degradation of
626 less than one half of one percent; running \fBtrapstat\fR with the \fB-t\fR or
627 \fB-T\fR option on a system spending 5% of total time processing TLB misses
628 induce a performance degradation of no more than 2.5%.
631 When run with the \fB-t\fR or \fB-T\fR option, \fBtrapstat\fR accounts for its
632 probe effect when calculating the \fI%tim\fR fields. This assures that the
633 \fI%tim\fR fields are a reasonably accurate indicator of the time a given
634 workload is spending handling TLB misses \(em regardless of the perturbing
635 presence of \fBtrapstat\fR.
638 While the \fI%tim\fR fields include the explicit cost of executing the TLB miss
639 handler, they do \fInot\fR include the implicit costs of TLB miss traps (for
640 example, pipeline effects, cache pollution, etc). These implicit costs become
641 more significant as the trap rate grows; if high \fI%tim\fR values are reported
642 (greater than 50%), you can accurately infer that much of the balance of time
643 is being spent on the implicit costs of the TLB miss traps.
646 Due to the potential system wide degradation induced, only the super-user can
647 run \fBtrapstat\fR.
650 Due to the limitation of the underlying statistics gathering methodology, only
651 one instance of \fBtrapstat\fR can run at a time.