dtrace Command Options
            
         The dtrace command accepts the following options:
               
dtrace [-32| -64] [-aACeFGHlqSvVwZ] [-b bufsz] [-c cmd]\ [-D name[=def]] [-I path] [-L path]\ [-o output] [-p pid] [-s script] [-U name]\ [-x arg[=val]] [-X[a| c| s| t]] [-P provider [[predicate]action]]\ [-m [[provider:]module [[predicate] action]]]\ [-f [[provider:]module:] func [[predicate] action]]\ [-n [[[provider:]module:] func:] name [[predicate] action]]\ [-i probe-id [[predicate] action]]
where predicate is any D predicate enclosed in slashes / / and action is any D statement list enclosed in braces { } according to the previously described D language syntax. If D program code is provided as an argument to the -P, -m, -f, -n, or -i options this text must be appropriately quoted to avoid interpretation by the shell. The options are as follows:
               
- 
                        -32,-64
- 
                     The D compiler produces programs using the native data model of the operating system kernel. You can use the isainfo -bcommand to determine the current operating system data model. If the-32option is specified,dtracewill force the D compiler to compile a D program using the 32-bit data model. If the-64option is specified,dtracewill force the D compiler to compile a D program using the 64-bit data model. These options are typically not required asdtraceselects the 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 may be executed on both 32-bit and 64-bit kernels. The-32and-64options also determine the ELF file format (ELF32 or ELF64) produced by the-Goption.
- 
                        -a
- 
                     Claim anonymous tracing state and display the traced data. You can combine the -aoption with the-eoption to forcedtraceto exit immediately after consuming the anonymous tracing state rather than continuing to wait for new data. See Anonymous Tracing in DTrace for more information about anonymous tracing.
- 
                        -A
- 
                     Generate driver.conf(5) directives for anonymous tracing. If the-Aoption is specified,dtracecompiles any D programs specified using the-soption or on the command line and constructs a set ofdtracedriver configuration file directives to enable the specified probes for anonymous tracing and then exits. For more information, see Anonymous Tracing in DTrace. By default,dtraceattempts to store the directives to the file/kernel/drv/dtrace.conf. This behavior can be modified using the-ooption to specify an alternate output file.
- 
                        -b
- 
                     Set principal trace buffer size. The trace buffer size can include any of the size suffixes k,m,g, ortas described in Anonymous Tracing in DTrace. If the buffer space cannot be allocated,dtraceattempts to reduce the buffer size or exit depending on the setting of thebufresizeproperty.
- 
                        -c
- 
                     Run the specified command cmd and exit upon its completion. If more than one -coption is present on the command line,dtraceexits when all commands have exited, reporting the exit status for each child process as it terminates. The process-ID of the first command is made available to any D programs specified on the command line or using the-soption through the$targetmacro variable. Refer to Scripting in DTrace for more information about macro variables.
- 
                        -C
- 
                     Run the C preprocessor cppover D programs before compiling them. Options can be passed to the C preprocessor using the-D,-U,-I, and-Hoptions. The degree of C standard conformance can be selected using the-Xoption. Refer to the description of the-Xoption for a description of the set of tokens defined by the D compiler when invoking the C preprocessor.
- 
                        -D
- 
                     Define the specified name when invoking cppwhich is enabled using the-Coption). If an equals sign (=) and additional value are specified, the name is assigned the corresponding value. This option passes the -D option to eachcppinvocation.
- 
                        -e
- 
                     Exit after compiling any requests and consuming anonymous tracing state (-a option) but prior to enabling any probes. This option can be combined with the -a option to print anonymous tracing data and exit, or it can be combined with D compiler options to verify that the programs compile without actually executing them and enabling the corresponding instrumentation. 
- 
                        -f
- 
                     Specify function name to trace or list ( -loption). The corresponding argument can include any of the probe description forms provider:module:function, module:function, or function. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than function are specified in the description, all probes with the corresponding function are matched. The-fargument can be suffixed with an optional D probe clause. More than one-foption may be specified on the command line at a time.
- 
                        -F
- 
                     Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with ->. Function return probe reports are unindented and their output is prefixed with<-.
- 
                        -G
- 
                     Generate an ELF file containing an embedded DTrace program. The DTrace probes specified in the program are saved inside of a relocatable ELF object that can be linked into another program. If the -ooption is present, the ELF file is saved using the pathname specified as the argument for this operand. If the-ooption is not present and the DTrace program is contained with a file whose name is filename.s, then the ELF file is saved using the name file.o; otherwise the ELF file is saved using the named.out.
- 
                        -H
- 
                     Print the path names of included files when invoking cpp(enabled using the-Coption). This option passes the-Hoption to eachcppinvocation, causing it to display the list of pathnames, one per line, tostderr.
- 
                        -i
- 
                     Specify probe identifier to trace or list ( -loption). Probe IDs are specified using decimal integers as shown bydtrace -l. The-iargument can be suffixed with an optional D probe clause. More than one-ioption may be specified on the command line at a time.
- 
                        -I
- 
                     Add the specified directory path to the search path for #includefiles when invokingcpp(1) (enabled using the-Coption). This option passes the-Ioption to eachcppinvocation. The specified directory is inserted into the search path ahead of the default directory list.
- 
                        -l
- 
                     List probes instead of enabling them. If the -loption is specified,dtraceproduces a report of the probes matching the descriptions given using the-P,-m,-f,-n,-i, and-soptions. If none of these options are specified, all probes are listed.
- 
                        -L
- 
                     Add the specified directory path to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that may be used when writing D programs. The specified path is added after the default library search path. 
- 
                        -m
- 
                     Specify module name to trace or list ( -loption). The corresponding argument can include any of the probe description forms provider:module or module. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than module are specified in the description, all probes with a corresponding module are matched. The-margument can be suffixed with an optional D probe clause. More than one-moption may be specified on the command line at a time.
- 
                        -n
- 
                     Specify probe name to trace or list ( -loption). The corresponding argument can include any of the probe description forms provider:module:function:name, module:function:name, function:name, or name. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than name are specified in the description, all probes with a corresponding name are matched. The-nargument can be suffixed with an optional D probe clause. More than one-noption may be specified on the command line at a time.
- 
                        -o
- 
                     Specify the output file for the -A,-G, and-loptions, or for the traced data. If the-Aoption is present and-ois not present, the default output file is/kernel/drv/dtrace.conf. If the-Goption is present and the-soption's argument is of the form filename.dand-ois not present, the default output file is filename.o; otherwise the default output file isd.out.
- 
                        -p
- 
                     Grab the specified process-ID pid, cache its symbol tables, and exit upon its completion. If more than one -poption is present on the command line,dtraceexits when all commands have exited, reporting the exit status 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-soption through the$targetmacro variable. Refer to Scripting in DTrace for more information about macro variables.
- 
                        -P
- 
                     Specify provider name to trace or list ( -loption). The remaining probe description fields module, function, and name are left blank and match any probes regardless of the values in those fields. The-Pargument can be suffixed with an optional D probe clause. More than one-Poption may be specified on the command line at a time.
- 
                        -q
- 
                     Set quiet mode. dtracewill suppress messages such as the number of probes matched by the specified options and D programs and will not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program statements such astraceandprintfwill be displayed tostdout.
- 
                        -s
- 
                     Compile the specified D program source file. If the -eoption is present, the program is compiled but no instrumentation is enabled. If the-loption is present, the program is compiled and the set of probes matched by it is listed, but no instrumentation will be enabled. If neither-enor-lare present, the instrumentation specified by the D program is enabled and tracing begins.
- 
                        -S
- 
                     Show D compiler intermediate code. The D compiler will produce a report of the intermediate code generated for each D program to stderr.
- 
                        -U
- 
                     Undefine the specified name when invoking cpp(1) (enabled using the -Coption). This option passes the -U option to eachcppinvocation.
- 
                        -v
- 
                     Set verbose mode. If the -voption is specified,dtraceproduces 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 DTrace Stability Mechanisms.
- 
                        -V
- 
                     Report the highest D programming interface version supported by dtrace. The version information is printed tostdoutand thedtracecommand exits. See Program Versioning in DTrace for more information about DTrace versioning features.
- 
                        -w
- 
                     Permit destructive actions in D programs specified using the -s,-P,-m,-f,-n, or-ioptions. If the-woption is not specified,dtracewill not permit the compilation or enabling of a D program that contains destructive actions. Destructive actions are described in further detail in DTrace Actions and Subroutines.
- 
                        -x
- 
                     Enable or modify a DTrace runtime option or D compiler option. The options are listed in DTrace Options and Tunables. Boolean options are enabled by specifying their name. Options with values are set by separating the option name and value with an equals sign ( =).
- 
                        -X
- 
                     Specify the degree of conformance to the ISO C standard that should be selected when invoking cpp(1) (enabled using the-Coption). The-Xoption argument affects the value and presence of the__STDC__macro depending upon the value of the argument letter:This option takes the following arguments: - 
                              a(default)
- 
                           ISO C plus K&R compatibility extensions, with semantic changes required by ISO C. This mode is the default mode if -Xis not specified. The predefined macro__STDC__has a value of 0 whencppis invoked in conjunction with the-Xaoption.
- 
                              c(conformance)
- 
                           Strictly conformant ISO C, without K&R C compatibility extensions. The predefined macro __STDC__has a value of 1 whencppis invoked in conjunction with the-Xcoption.
- 
                              s(K&R C)
- 
                           K&R C only. The macro __STDC__is not defined whencppis invoked in conjunction with the-Xsoption.
- 
                              t
- 
                           ISO C plus K&R C compatibility extensions, without semantic changes required by ISO C. The predefined macro __STDC__has a value of 0 whencppis invoked in conjunction with the-Xtoption.
 Because the -Xoption affects only how the D compiler invokes the C preprocessor, the-Xaand-Xtoptions are equivalent from the perspective of D. Both options are provided to ease re-use of settings from a C build environment.Regardless of the -Xmode, the following additional C preprocessor definitions are always specified and valid in all modes:- 
                           __sun
- 
                           __unix
- 
                           __SVR4
- 
                           __sparc(on SPARC systems only)
- 
                           __sparcv9(on SPARC systems only when 64-bit programs are compiled)
- 
                           __i386(on x86 systems only when 32-bit programs are compiled)
- 
                           __amd64(on x86 systems only when 64-bit programs are compiled)
- 
                           ___`uname -s`_`uname -r`_ (for example,__SunOS_5_10)
- 
                           __SUNW_D=1
- 
                           __SUNW_D_VERSION=0x_MMmmmuuu_ (where _MM_ is the Major release value in hexadecimal, _mmm_ is the Minor release value in hexadecimal, and _uuu_ is the Micro release value in hexadecimal; see Program Versioning in DTrace for more information about DTrace versioning)
 
- 
                              
- 
                        -Z
- 
                     Permit probe descriptions that match zero probes. If the -Zoption is not specified,dtracewill report an error and exit if any probe descriptions specified in D program files (-soption) or on the command line (-P,-m,-f,-n, or-ioptions) contain descriptions that do not match any known probes.