]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / cddl / contrib / opensolaris / cmd / dtrace / dtrace.1
1 '\" te
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").  
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
21 .TH dtrace 1M "5 Sep 2006" "SunOS 5.11" "System Administration Commands"
22 .SH NAME
23 dtrace \- DTrace dynamic tracing compiler and tracing utility
24 .SH SYNOPSIS
25 .LP
26 .nf
27 \fBdtrace\fR [\fB-32\fR | \fB-64\fR] [\fB-aACeFGHhlqSvVwZ\fR] [\fB-b\fR \fIbufsz\fR] [\fB-c\fR \fIcmd\fR] 
28     [\fB-D\fR \fIname\fR [\fI=value\fR]] [\fB-I\fR \fIpath\fR] [\fB-L\fR \fIpath\fR] [\fB-o\fR \fIoutput\fR] 
29     [\fB-s\fR \fIscript\fR] [\fB-U\fR \fIname\fR] [\fB-x\fR \fIarg\fR [\fI=val\fR]] 
30     [\fB-X\fR a | c | s | t] [\fB-p\fR \fIpid\fR] 
31     [\fB-P\fR \fIprovider\fR [[\fIpredicate\fR] \fIaction\fR]] 
32     [\fB-m\fR [\fIprovider:\fR] \fImodule\fR [[\fIpredicate\fR] \fIaction\fR]] 
33     [\fB-f\fR [[\fIprovider:\fR] \fImodule:\fR] \fIfunction\fR [[\fIpredicate\fR] \fIaction\fR]] 
34     [\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]] 
35     [\fB-i\fR \fIprobe-id\fR [[\fIpredicate\fR] \fIaction\fR]]
36 .fi
37
38 .SH DESCRIPTION
39 .sp
40 .LP
41 DTrace is a comprehensive dynamic tracing framework for the Solaris Operating System. DTrace provides a powerful infrastructure that permits administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs. 
42 .sp
43 .LP
44 The \fISolaris Dynamic Tracing Guide\fR describes how to use DTrace to observe, debug, and tune system behavior. Refer to this book for a detailed description of DTrace features, including the bundled DTrace observability
45 tools, instrumentation providers, and the D programming language.
46 .sp
47 .LP
48 The \fBdtrace\fR command provides a generic interface to the essential services provided by the DTrace facility, including:
49 .RS +4
50 .TP
51 .ie t \(bu
52 .el o
53 Options that list the set of probes and providers currently published by DTrace
54 .RE
55 .RS +4
56 .TP
57 .ie t \(bu
58 .el o
59 Options that enable probes directly using any of the probe description specifiers (provider, module, function, name)
60 .RE
61 .RS +4
62 .TP
63 .ie t \(bu
64 .el o
65 Options that run the D compiler and compile one or more D program files or programs written directly on the command line
66 .RE
67 .RS +4
68 .TP
69 .ie t \(bu
70 .el o
71 Options that generate anonymous tracing programs
72 .RE
73 .RS +4
74 .TP
75 .ie t \(bu
76 .el o
77 Options that generate program stability reports
78 .RE
79 .RS +4
80 .TP
81 .ie t \(bu
82 .el o
83 Options that modify DTrace tracing and buffering behavior and enable additional D compiler features
84 .RE
85 .sp
86 .LP
87 You can use \fBdtrace\fR to create D scripts by using it in a \fB#!\fR declaration to create an interpreter file. You can also use \fBdtrace\fR to attempt to compile D programs and determine their properties without actually enabling tracing using the \fB-e\fR option. See \fBOPTIONS\fR. See the \fISolaris Dynamic Tracing Guide\fR for detailed examples of how to use the \fBdtrace\fR utility to perform these tasks.
88 .SH OPTIONS
89 .sp
90 .LP
91 The arguments accepted by the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, and \fB-i\fR options can include an optional D language \fIpredicate\fR enclosed in slashes \fB//\fR and optional D language \fIaction\fR statement list enclosed in braces \fB{}\fR. D program code specified on the command line must be appropriately quoted to avoid intepretation of meta-characters by the shell. 
92 .sp
93 .LP
94 The following options are supported:
95 .sp
96 .ne 2
97 .mk
98 .na
99 \fB\fB-32\fR | \fB-64\fR\fR
100 .ad
101 .sp .6
102 .RS 4n
103 The D compiler produces programs using the native data model of the operating system kernel. You can use the \fBisainfo\fR \fB-b\fR command to determine the current operating system data model.  If the \fB-32\fR option is specified, \fBdtrace\fR forces
104 the D compiler to compile a D program using the 32-bit data model. If the \fB-64\fR option is specified, \fBdtrace\fR forces the D compiler to compile a D program using the 64-bit data model. These options are typically not required as \fBdtrace\fR selects the
105 native data model as the default. The data model affects the sizes of integer types and other language properties. D programs compiled for either data model can be executed on both 32-bit and 64-bit kernels. The \fB-32\fR and \fB-64\fR options also determine the ELF file format
106 (ELF32 or ELF64) produced by the \fB-G\fR option.
107 .RE
108
109 .sp
110 .ne 2
111 .mk
112 .na
113 \fB\fB-a\fR\fR
114 .ad
115 .sp .6
116 .RS 4n
117 Claim anonymous tracing state and display the traced data. You can combine the \fB-a\fR option with the \fB-e\fR option to force \fBdtrace\fR to exit immediately after consuming the anonymous tracing state rather than continuing to wait for new
118 data. See the \fISolaris Dynamic Tracing Guide\fR for more information about anonymous tracing.
119 .RE
120
121 .sp
122 .ne 2
123 .mk
124 .na
125 \fB\fB-A\fR\fR
126 .ad
127 .sp .6
128 .RS 4n
129 Generate \fBdriver.conf\fR(4) directives for anonymous tracing. This option constructs a set of \fBdtrace\fR(7D) configuration file directives to enable the specified probes for anonymous tracing and then exits. By default, \fBdtrace\fR attempts to store the directives to the file \fB/kernel/drv/dtrace.conf\fR. You can modify this behavior if you use the \fB-o\fR option to specify an alternate output file.
130 .RE
131
132 .sp
133 .ne 2
134 .mk
135 .na
136 \fB\fB-b\fR \fIbufsz\fR\fR
137 .ad
138 .sp .6
139 .RS 4n
140 Set principal trace buffer size (\fIbufsz\fR). The trace buffer size can include any of the size suffixes \fBk\fR, \fBm\fR, \fBg\fR, or \fBt\fR.  If the buffer space cannot be allocated, \fBdtrace\fR attempts
141 to reduce the buffer size or exit depending on the setting of the \fBbufresize\fR property.
142 .RE
143
144 .sp
145 .ne 2
146 .mk
147 .na
148 \fB\fB-c\fR \fIcmd\fR\fR
149 .ad
150 .sp .6
151 .RS 4n
152 Run the specified command \fIcmd\fR and exit upon its completion. If more than one \fB-c\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status for each child process as it
153 terminates. The process-ID of the first command is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information
154 on macro variables.
155 .RE
156
157 .sp
158 .ne 2
159 .mk
160 .na
161 \fB\fB-C\fR\fR
162 .ad
163 .sp .6
164 .RS 4n
165 Run the C preprocessor \fBcpp\fR(1) over D programs before compiling them. You can pass options to the C preprocessor using the \fB-D\fR, \fB-U\fR, \fB-I\fR, and \fB-H\fR options. You can select the degree of C standard conformance if you use the \fB-X\fR option. For a description of the set of tokens defined by the D compiler when invoking the C preprocessor, see \fB-X\fR.
166 .RE
167
168 .sp
169 .ne 2
170 .mk
171 .na
172 \fB\fB-D\fR \fIname\fR \fB[=\fR\fIvalue\fR\fB]\fR\fR
173 .ad
174 .sp .6
175 .RS 4n
176 Define \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). If you specify the equals sign (\fB=\fR)
177 and additional \fIvalue\fR, the name is assigned the corresponding value. This option passes the \fB-D\fR option to each \fBcpp\fR invocation.
178 .RE
179
180 .sp
181 .ne 2
182 .mk
183 .na
184 \fB\fB-e\fR\fR
185 .ad
186 .sp .6
187 .RS 4n
188 Exit after compiling any requests and consuming anonymous tracing state (\fB-a\fR option) but prior to enabling any probes. You can combine this option with the \fB-a\fR option to print anonymous tracing data and exit. You can also combine this option with D
189 compiler options. This combination verifies that the programs compile without actually executing them and enabling the corresponding instrumentation.
190 .RE
191
192 .sp
193 .ne 2
194 .mk
195 .na
196 \fB\fB-f\fR\fB[[\fR\fIprovider\fR\fB:]\fR\fImodule\fR\fB:]\fR\fIfunction\fR\fB[[\fR\fIpredicate\fR\fB]\fR\fIaction\fR\fB]]\fR\fR
197 .ad
198 .sp .6
199 .RS 4n
200 Specify function name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function\fR, \fImodule:function\fR, or \fIfunction\fR.
201 Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIfunction\fR are specified in the description, all probes with the corresponding \fIfunction\fR are matched.
202 The \fB-f\fR argument can be suffixed with an optional D probe clause. You can specify more than one \fB-f\fR option on the command line at a time.
203 .RE
204
205 .sp
206 .ne 2
207 .mk
208 .na
209 \fB\fB-F\fR\fR
210 .ad
211 .sp .6
212 .RS 4n
213 Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with \fB->\fR. Function return probe reports are unindented and their output is prefixed with \fB<-\fR\&. System call
214 entry probe reports are indented and their output is prefixed with \fB=>\fR. System call return probe reports are unindented and their output is prefixed with \fB<=\fR\&.
215 .RE
216
217 .sp
218 .ne 2
219 .mk
220 .na
221 \fB\fB-G\fR\fR
222 .ad
223 .sp .6
224 .RS 4n
225 Generate an ELF file containing an embedded DTrace program. The DTrace probes specified in the program are saved inside of a relocatable ELF object which can be linked into another program. If the \fB-o\fR option is present, the ELF file is saved using the pathname specified
226 as the argument for this operand. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fB\fIfilename\fR.d\fR, then the ELF file is saved using the name \fB\fIfilename\fR.o\fR.
227 Otherwise the ELF file is saved using the name \fBd.out\fR.
228 .RE
229
230 .sp
231 .ne 2
232 .mk
233 .na
234 \fB\fB-H\fR\fR
235 .ad
236 .sp .6
237 .RS 4n
238 Print the pathnames of included files when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-H\fR option
239 to each \fBcpp\fR invocation, causing it to display the list of pathnames, one for each line, to \fBstderr\fR.
240 .RE
241
242 .sp
243 .ne 2
244 .mk
245 .na
246 \fB\fB-h\fR\fR
247 .ad
248 .sp .6
249 .RS 4n
250 Generate a header file containing macros that correspond to probes in the specified provider definitions. This option should be used to generate a header file that is included by other source files for later use with the \fB-G\fR option. If the \fB-o\fR option
251 is present, the header file is saved using the pathname specified as the argument for that option. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fIfilename\fR\fB\&.d\fR, then the header file is saved
252 using the name \fIfilename\fR\fB\&.h\fR.
253 .RE
254
255 .sp
256 .ne 2
257 .mk
258 .na
259 \fB\fB-i\fR \fIprobe-id\fR\fB[[\fR\fIpredicate\fR] \fIaction\fR\fB]\fR\fR
260 .ad
261 .sp .6
262 .RS 4n
263 Specify probe identifier (\fIprobe-id\fR) to trace or list (\fB-l\fR option). You can specify probe IDs using decimal integers as shown by \fBdtrace\fR \fB-l\fR. The \fB-i\fR argument can be suffixed with an optional
264 D probe clause. You can specify more than one \fB-i\fR option at a time.
265 .RE
266
267 .sp
268 .ne 2
269 .mk
270 .na
271 \fB\fB-I\fR \fIpath\fR\fR
272 .ad
273 .sp .6
274 .RS 4n
275 Add the specified directory \fIpath\fR to the search path for \fB#include\fR files when invoking \fBcpp\fR(1) (enabled
276 using the \fB-C\fR option). This option passes the \fB-I\fR option to each \fBcpp\fR invocation. The specified \fIpath\fR is inserted into the search path ahead of the default directory list.
277 .RE
278
279 .sp
280 .ne 2
281 .mk
282 .na
283 \fB\fB-L\fR \fIpath\fR\fR
284 .ad
285 .sp .6
286 .RS 4n
287 Add the specified directory \fIpath\fR to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that can be used when writing D programs. The specified \fIpath\fR is added after the default library
288 search path.
289 .RE
290
291 .sp
292 .ne 2
293 .mk
294 .na
295 \fB\fB-l\fR\fR
296 .ad
297 .sp .6
298 .RS 4n
299 List probes instead of enabling them. If the \fB-l\fR option is specified, \fBdtrace\fR produces a report of the probes matching the descriptions given using the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, \fB-i\fR,
300 and \fB-s\fR options. If none of these options are specified, this option lists all probes.
301 .RE
302
303 .sp
304 .ne 2
305 .mk
306 .na
307 \fB\fB-m\fR [[\fIprovider:\fR] \fImodule:\fR [[\fIpredicate\fR] \fIaction\fR]]\fR
308 .ad
309 .sp .6
310 .RS 4n
311 Specify module name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module\fR or \fImodule\fR. Unspecified probe description fields are left blank and match
312 any probes regardless of the values in those fields. If no qualifiers other than \fImodule\fR are specified in the description, all probes with a corresponding \fImodule\fR are matched. The \fB-m\fR argument can be suffixed with an optional D
313 probe clause. More than one \fB-m\fR option can be specified on the command line at a time.
314 .RE
315
316 .sp
317 .ne 2
318 .mk
319 .na
320 \fB\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]\fR
321 .ad
322 .sp .6
323 .RS 4n
324 Specify probe name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function:name\fR, \fImodule:function:name\fR, \fIfunction:name\fR,
325 or \fIname\fR.  Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIname\fR are specified in the description, all probes with a corresponding \fIname\fR are
326 matched. The \fB-n\fR argument can be suffixed with an optional D probe clause. More than one \fB-n\fR option can be specified on the command line at a time.
327 .RE
328
329 .sp
330 .ne 2
331 .mk
332 .na
333 \fB\fB-o\fR \fIoutput\fR\fR
334 .ad
335 .sp .6
336 .RS 4n
337 Specify the \fIoutput\fR file for the \fB-A\fR , \fB-G\fR, and \fB-l\fR options, or for the traced data itself. If the \fB-A\fR option is present and \fB-o\fR is not present, the default output file is \fB/kernel/drv/dtrace.conf\fR. If the \fB-G\fR option is present and the \fB-s\fR option's argument is of the form \fB\fIfilename\fR.d\fR and \fB-o\fR is not present, the default output file is \fB\fIfilename\fR.o\fR.
338 Otherwise the default output file is \fBd.out\fR.
339 .RE
340
341 .sp
342 .ne 2
343 .mk
344 .na
345 \fB\fB-p\fR \fIpid\fR\fR
346 .ad
347 .sp .6
348 .RS 4n
349 Grab the specified process-ID \fIpid\fR, cache its symbol tables, and exit upon its completion. If more than one \fB-p\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status
350 for each process as it terminates. The first process-ID is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for
351 more information on macro variables.
352 .RE
353
354 .sp
355 .ne 2
356 .mk
357 .na
358 \fB\fB-P\fR \fIprovider\fR \fB[[\fR\fIpredicate\fR\fB]\fR \fIaction\fR]\fR
359 .ad
360 .sp .6
361 .RS 4n
362 Specify provider name to trace or list (\fB-l\fR option). The remaining probe description fields module, function, and name are left blank and match any probes regardless of the values in those fields. The \fB-P\fR argument can be suffixed with an optional D
363 probe clause. You can specify more than one \fB-P\fR option on the command line at a time.
364 .RE
365
366 .sp
367 .ne 2
368 .mk
369 .na
370 \fB\fB-q\fR\fR
371 .ad
372 .sp .6
373 .RS 4n
374 Set quiet mode. \fBdtrace\fR suppresses messages such as the number of probes matched by the specified options and D programs and does not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program
375 statements such as \fBtrace()\fR and \fBprintf()\fR is displayed to \fBstdout\fR.
376 .RE
377
378 .sp
379 .ne 2
380 .mk
381 .na
382 \fB\fB-s\fR\fR
383 .ad
384 .sp .6
385 .RS 4n
386 Compile the specified D program source file. If the \fB-e\fR option is present, the program is compiled but instrumentation is not enabled. If the \fB-l\fR option is present, the program is compiled and the set of probes matched by it is listed, but instrumentation
387 is not enabled. If none of \fB-e\fR, \fB-l\fR, \fB-G\fR, or \fB-A\fR are present, the instrumentation specified by the D program is enabled and tracing begins.
388 .RE
389
390 .sp
391 .ne 2
392 .mk
393 .na
394 \fB\fB-S\fR\fR
395 .ad
396 .sp .6
397 .RS 4n
398 Show D compiler intermediate code. The D compiler produces a report of the intermediate code generated for each D program to \fBstderr\fR.
399 .RE
400
401 .sp
402 .ne 2
403 .mk
404 .na
405 \fB\fB-U\fR \fIname\fR\fR
406 .ad
407 .sp .6
408 .RS 4n
409 Undefine the specified \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-U\fR option to each \fBcpp\fR invocation.
410 .RE
411
412 .sp
413 .ne 2
414 .mk
415 .na
416 \fB\fB-v\fR\fR
417 .ad
418 .sp .6
419 .RS 4n
420 Set verbose mode. If the \fB-v\fR option is specified, \fBdtrace\fR produces a program stability report showing the minimum interface stability and dependency level for the specified D programs. DTrace stability levels are explained in further detail in the \fISolaris Dynamic Tracing Guide\fR.
421 .RE
422
423 .sp
424 .ne 2
425 .mk
426 .na
427 \fB\fB-V\fR\fR
428 .ad
429 .sp .6
430 .RS 4n
431 Report the highest D programming interface version supported by \fBdtrace\fR. The version information is printed to \fBstdout\fR and the \fBdtrace\fR command exits. Refer to the \fISolaris Dynamic Tracing Guide\fR for
432 more information about DTrace versioning features.
433 .RE
434
435 .sp
436 .ne 2
437 .mk
438 .na
439 \fB\fB-w\fR\fR
440 .ad
441 .sp .6
442 .RS 4n
443 Permit destructive actions in D programs specified using the \fB-s\fR, \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options. If the \fB-w\fR option is not specified, \fBdtrace\fR does not
444 permit the compilation or enabling of a D program that contains destructive actions.
445 .RE
446
447 .sp
448 .ne 2
449 .mk
450 .na
451 \fB\fB-x\fR \fIarg\fR [\fI=val\fR]\fR
452 .ad
453 .sp .6
454 .RS 4n
455 Enable or modify a DTrace runtime option or D compiler option. The list of options is found in the \fISolaris Dynamic Tracing Guide\fR.  Boolean options are enabled by specifying their name. Options with values are set by separating the option name and
456 value with an equals sign (\fB=\fR).
457 .RE
458
459 .sp
460 .ne 2
461 .mk
462 .na
463 \fB\fB-X\fR \fBa | c | s | t\fR\fR
464 .ad
465 .sp .6
466 .RS 4n
467 Specify the degree of conformance to the ISO C standard that should be selected when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option).
468 The \fB-X\fR option argument affects the value and presence of the \fB__STDC__\fR macro depending upon the value of the argument letter.
469 .sp
470 The \fB-X\fR option supports the following arguments:
471 .sp
472 .ne 2
473 .mk
474 .na
475 \fB\fBa\fR\fR
476 .ad
477 .RS 5n
478 .rt  
479 Default. ISO C plus K&R compatibility extensions, with semantic changes required by ISO C. This is the default mode if \fB-X\fR is not specified. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction
480 with the \fB-Xa\fR option.
481 .RE
482
483 .sp
484 .ne 2
485 .mk
486 .na
487 \fB\fBc\fR\fR
488 .ad
489 .RS 5n
490 .rt  
491 Conformance. Strictly conformant ISO C, without K&R C compatibility extensions. The predefined macro \fB__STDC__\fR has a value of 1 when \fBcpp\fR is invoked in conjunction with the \fB-Xc\fR option.
492 .RE
493
494 .sp
495 .ne 2
496 .mk
497 .na
498 \fB\fBs\fR\fR
499 .ad
500 .RS 5n
501 .rt  
502 K&R C only. The macro \fB__STDC__\fR is not defined when \fBcpp\fR is invoked in conjunction with the \fB-Xs\fR option.
503 .RE
504
505 .sp
506 .ne 2
507 .mk
508 .na
509 \fB\fBt\fR\fR
510 .ad
511 .RS 5n
512 .rt  
513 Transition. ISO C plus K&R C compatibility extensions, without semantic changes required by ISO C. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction with the \fB-Xt\fR option.
514 .RE
515
516 As the \fB-X\fR option only affects how the D compiler invokes the C preprocessor, the \fB-Xa\fR and \fB-Xt\fR options are equivalent from the perspective of D and both are provided only to ease re-use of settings from a C build environment.
517 .sp
518 Regardless of the \fB-X\fR mode, the following additional C preprocessor definitions are always specified and valid in all modes:
519 .RS +4
520 .TP
521 .ie t \(bu
522 .el o
523 \fB__sun\fR
524 .RE
525 .RS +4
526 .TP
527 .ie t \(bu
528 .el o
529 \fB__unix\fR
530 .RE
531 .RS +4
532 .TP
533 .ie t \(bu
534 .el o
535 \fB__SVR4\fR
536 .RE
537 .RS +4
538 .TP
539 .ie t \(bu
540 .el o
541 \fB__sparc\fR (on SPARC systems only)
542 .RE
543 .RS +4
544 .TP
545 .ie t \(bu
546 .el o
547 \fB__sparcv9\fR (on SPARC systems only when 64-bit programs are compiled)
548 .RE
549 .RS +4
550 .TP
551 .ie t \(bu
552 .el o
553 \fB__i386\fR (on x86 systems only when 32-bit programs are compiled)
554 .RE
555 .RS +4
556 .TP
557 .ie t \(bu
558 .el o
559 \fB__amd64\fR (on x86 systems only when 64-bit programs are compiled)
560 .RE
561 .RS +4
562 .TP
563 .ie t \(bu
564 .el o
565 \fB__\fI`uname -s`\fR_\fI`uname -r`\fR\fR (for example, \fB__SunOS_5_10\fR)
566 .RE
567 .RS +4
568 .TP
569 .ie t \(bu
570 .el o
571 \fB__SUNW_D=1\fR
572 .RE
573 .RS +4
574 .TP
575 .ie t \(bu
576 .el o
577 \fB__SUNW_D_VERSION=0x\fIMMmmmuuu\fR\fR
578 .sp
579 Where \fIMM\fR is the major release value in hexadecimal, \fImmm\fR is the minor release value in hexadecimal, and \fIuuu\fR is the
580 micro release value in hexadecimal. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information about DTrace versioning.
581 .RE
582 .RE
583
584 .sp
585 .ne 2
586 .mk
587 .na
588 \fB\fB-Z\fR\fR
589 .ad
590 .sp .6
591 .RS 4n
592 Permit probe descriptions that match zero probes. If the \fB-Z\fR option is not specified, \fBdtrace\fR reports an error and exits if any probe descriptions specified in D program files (\fB-s\fR option) or on the command line (\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options) contain descriptions that do not match any known probes.
593 .RE
594
595 .SH OPERANDS
596 .sp
597 .LP
598 You can specify zero or more additional arguments on the \fBdtrace\fR command line to define a set of macro variables (\fB$1\fR, \fB$2\fR, and so forth). The additional arguments can be used in D programs specified using the \fB-s\fR option
599 or on the command line. The use of macro variables is described further in the \fISolaris Dynamic Tracing Guide\fR.
600 .SH EXIT STATUS
601 .sp
602 .LP
603 The following exit values are returned:
604 .sp
605 .ne 2
606 .mk
607 .na
608 \fB0\fR
609 .ad
610 .RS 5n
611 .rt  
612 Successful completion. 
613 .sp
614 For D program requests, an exit status of \fB0\fR indicates that programs were successfully compiled, probes were successfully enabled, or anonymous state was successfully retrieved. \fBdtrace\fR returns \fB0\fR even if the specified tracing requests
615 encountered errors or drops.
616 .RE
617
618 .sp
619 .ne 2
620 .mk
621 .na
622 \fB\fB1\fR\fR
623 .ad
624 .RS 5n
625 .rt  
626 An error occurred.
627 .sp
628 For D program requests, an exit status of \fB1\fR indicates that program compilation failed or that the specified request could not be satisfied.
629 .RE
630
631 .sp
632 .ne 2
633 .mk
634 .na
635 \fB\fB2\fR\fR
636 .ad
637 .RS 5n
638 .rt  
639 Invalid command line options or arguments were specified.
640 .RE
641
642 .SH ATTRIBUTES
643 .sp
644 .LP
645 See \fBattributes\fR(5) for descriptions of the following attributes:
646 .sp
647
648 .sp
649 .TS
650 tab(\a) box;
651 cw(2.75i) |cw(2.75i) 
652 lw(2.75i) |lw(2.75i) 
653 .
654 ATTRIBUTE TYPE\aATTRIBUTE VALUE
655 _
656 Availability\aSUNWdtrc
657 _
658 Interface Stability\aSee below.
659 .TE
660
661 .sp
662 .LP
663 The command-line syntax is Committed. The human-readable output is Uncommitted.
664 .SH SEE ALSO
665 .sp
666 .LP
667 \fBcpp\fR(1), \fBisainfo\fR(1), \fBlibdtrace\fR(3LIB), \fBdriver.conf\fR(4), \fBattributes\fR(5), \fBdtrace\fR(7D)
668 .sp
669 .LP
670 \fISolaris Dynamic Tracing Guide\fR