12be1a816SJohn Birrell.\" CDDL HEADER START 22be1a816SJohn Birrell.\" 32be1a816SJohn Birrell.\" The contents of this file are subject to the terms of the 42be1a816SJohn Birrell.\" Common Development and Distribution License (the "License"). 52be1a816SJohn Birrell.\" You may not use this file except in compliance with the License. 62be1a816SJohn Birrell.\" 72be1a816SJohn Birrell.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 82be1a816SJohn Birrell.\" or http://www.opensolaris.org/os/licensing. 92be1a816SJohn Birrell.\" See the License for the specific language governing permissions 102be1a816SJohn Birrell.\" and limitations under the License. 112be1a816SJohn Birrell.\" 122be1a816SJohn Birrell.\" When distributing Covered Code, include this CDDL HEADER in each 132be1a816SJohn Birrell.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 142be1a816SJohn Birrell.\" If applicable, add the following below this CDDL HEADER, with the 152be1a816SJohn Birrell.\" fields enclosed by brackets "[]" replaced with your own identifying 162be1a816SJohn Birrell.\" information: Portions Copyright [yyyy] [name of copyright owner] 172be1a816SJohn Birrell.\" 182be1a816SJohn Birrell.\" CDDL HEADER END 192be1a816SJohn Birrell.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. 203f3c4e0bSMark Johnston.\" 21*93f27766SDomagoj Stolfa.\" $FreeBSD$ 22*93f27766SDomagoj Stolfa.\" 23*93f27766SDomagoj Stolfa.Dd September 8, 2023 243f3c4e0bSMark Johnston.Dt DTRACE 1 253f3c4e0bSMark Johnston.Os 263f3c4e0bSMark Johnston.Sh NAME 273f3c4e0bSMark Johnston.Nm dtrace 283f3c4e0bSMark Johnston.Nd dynamic tracing compiler and tracing utility 293f3c4e0bSMark Johnston.Sh SYNOPSIS 303f3c4e0bSMark Johnston.Nm 313f3c4e0bSMark Johnston.Op Fl 32 | Fl 64 32*93f27766SDomagoj Stolfa.Op Fl aACdeFGhHlOqSvVwZ 33*93f27766SDomagoj Stolfa.Op Fl -libxo 343f3c4e0bSMark Johnston.Op Fl b Ar bufsz 353f3c4e0bSMark Johnston.Op Fl c Ar cmd 363f3c4e0bSMark Johnston.Op Fl D Ar name Op Ns = Ns value 373f3c4e0bSMark Johnston.Op Fl I Ar path 383f3c4e0bSMark Johnston.Op Fl L Ar path 393f3c4e0bSMark Johnston.Op Fl o Ar output 403f3c4e0bSMark Johnston.Op Fl s Ar script 413f3c4e0bSMark Johnston.Op Fl U Ar name 423f3c4e0bSMark Johnston.Op Fl x Ar arg Op Ns = Ns value 433f3c4e0bSMark Johnston.Op Fl X Cm a | c | s | t 443f3c4e0bSMark Johnston.Op Fl p Ar pid 453f3c4e0bSMark Johnston.Op Fl P Ar provider Oo Oo Ar predicate Oc Ar action Oc 463f3c4e0bSMark Johnston.Op Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc 473f3c4e0bSMark Johnston.Op Fl f Oo Oo Ar provider : Oc Ar module : Oc Ar function Oo Oo Ar predicate \ 483f3c4e0bSMark Johnston Oc Ar action Oc 493f3c4e0bSMark Johnston.Op Fl n Oo Oo Oo Ar provider : Oc Ar module : Oc Ar function : Oc Ar name \ 503f3c4e0bSMark Johnston Oo Oo Ar predicate Oc Ar action Oc 513f3c4e0bSMark Johnston.Op Fl i Ar probe-id Oo Oo Ar predicate Oc Ar action Oc 523f3c4e0bSMark Johnston.Sh DESCRIPTION 533f3c4e0bSMark JohnstonDTrace is a comprehensive dynamic tracing framework ported from Solaris. 543f3c4e0bSMark JohnstonDTrace provides a powerful infrastructure that permits administrators, 553f3c4e0bSMark Johnstondevelopers, and service personnel to concisely answer arbitrary questions about 563f3c4e0bSMark Johnstonthe behavior of the operating system and user programs. 573f3c4e0bSMark Johnston.Pp 583f3c4e0bSMark JohnstonThe 593f3c4e0bSMark Johnston.Nm 603f3c4e0bSMark Johnstoncommand provides a generic interface to the essential services provided by the 613f3c4e0bSMark JohnstonDTrace facility, including: 623f3c4e0bSMark Johnston.Bl -bullet -offset indent 633f3c4e0bSMark Johnston.It 642be1a816SJohn BirrellOptions that list the set of probes and providers currently published by DTrace 653f3c4e0bSMark Johnston.It 663f3c4e0bSMark JohnstonOptions that enable probes directly using any of the probe description 673f3c4e0bSMark Johnstonspecifiers (provider, module, function, name) 683f3c4e0bSMark Johnston.It 693f3c4e0bSMark JohnstonOptions that run the D compiler and compile one or more D program files or 703f3c4e0bSMark Johnstonprograms written directly on the command line 713f3c4e0bSMark Johnston.It 722be1a816SJohn BirrellOptions that generate anonymous tracing programs 733f3c4e0bSMark Johnston.It 742be1a816SJohn BirrellOptions that generate program stability reports 753f3c4e0bSMark Johnston.It 763f3c4e0bSMark JohnstonOptions that modify DTrace tracing and buffering behavior and enable 773f3c4e0bSMark Johnstonadditional D compiler features 783f3c4e0bSMark Johnston.El 793f3c4e0bSMark Johnston.Pp 803f3c4e0bSMark JohnstonYou can use 813f3c4e0bSMark Johnston.Nm 823f3c4e0bSMark Johnstonto create D scripts by using it in a shebang declaration to create an 833f3c4e0bSMark Johnstoninterpreter file. 843f3c4e0bSMark JohnstonYou can also use 853f3c4e0bSMark Johnston.Nm 863f3c4e0bSMark Johnstonto attempt to compile D programs and determine their properties without 873f3c4e0bSMark Johnstonactually enabling traces using the 883f3c4e0bSMark Johnston.Fl e 893f3c4e0bSMark Johnstonoption. 903f3c4e0bSMark Johnston.Sh OPTIONS 913f3c4e0bSMark JohnstonThe arguments accepted by the 923f3c4e0bSMark Johnston.Fl P , 933f3c4e0bSMark Johnston.Fl m , 943f3c4e0bSMark Johnston.Fl f , 953f3c4e0bSMark Johnston.Fl n , 963f3c4e0bSMark Johnstonand 973f3c4e0bSMark Johnston.Fl i 983f3c4e0bSMark Johnstonoptions can include an optional D language 993f3c4e0bSMark Johnston.Ar predicate 1003f3c4e0bSMark Johnstonenclosed in slashes and an optional D language 1013f3c4e0bSMark Johnston.Ar action 1023f3c4e0bSMark Johnstonstatement list enclosed in braces. 1033f3c4e0bSMark JohnstonD program code specified on the command line must be appropriately quoted to 1043f3c4e0bSMark Johnstonavoid interpretation of meta-characters by the shell. 1053f3c4e0bSMark Johnston.Pp 1062be1a816SJohn BirrellThe following options are supported: 1073f3c4e0bSMark Johnston.Bl -tag -width indent 1083f3c4e0bSMark Johnston.It Fl 32 | Fl 64 1093f3c4e0bSMark JohnstonThe D compiler produces programs using the native data model of the operating 1103f3c4e0bSMark Johnstonsystem kernel. 1113f3c4e0bSMark JohnstonIf the 1123f3c4e0bSMark Johnston.Fl 32 1133f3c4e0bSMark Johnstonoption is specified, 1143f3c4e0bSMark Johnston.Nm 1153f3c4e0bSMark Johnstonforces the D compiler to compile a D program using the 32-bit data model. 1163f3c4e0bSMark JohnstonIf the 1173f3c4e0bSMark Johnston.Fl 64 1183f3c4e0bSMark Johnstonoption is specified, 1193f3c4e0bSMark Johnston.Nm 1203f3c4e0bSMark Johnstonforces the D compiler to compile a D program using the 64-bit data model. 1213f3c4e0bSMark JohnstonThese options are typically not required as 1223f3c4e0bSMark Johnston.Nm 1233f3c4e0bSMark Johnstonselects the native data model as the default. 1243f3c4e0bSMark JohnstonThe data model affects the sizes of integer types and other language properties. 1253f3c4e0bSMark JohnstonD programs compiled for either data model can be executed on both 32-bit and 1263f3c4e0bSMark Johnston64-bit kernels. 1273f3c4e0bSMark JohnstonThe 1283f3c4e0bSMark Johnston.Fl 32 1293f3c4e0bSMark Johnstonand 1303f3c4e0bSMark Johnston.Fl 64 1313f3c4e0bSMark Johnstonoptions also determine the 1323f3c4e0bSMark Johnston.Xr elf 5 1333f3c4e0bSMark Johnstonfile format (ELF32 or ELF64) produced by the 1343f3c4e0bSMark Johnston.Fl G 1353f3c4e0bSMark Johnstonoption. 1363f3c4e0bSMark Johnston.It Fl a 1373f3c4e0bSMark JohnstonClaim anonymous tracing state and display the traced data. 1383f3c4e0bSMark JohnstonYou can combine the 1393f3c4e0bSMark Johnston.Fl a 1403f3c4e0bSMark Johnstonoption with the 1413f3c4e0bSMark Johnston.Fl e 1423f3c4e0bSMark Johnstonoption to force 1433f3c4e0bSMark Johnston.Nm 1443f3c4e0bSMark Johnstonto exit immediately after consuming the anonymous tracing state rather than 1453f3c4e0bSMark Johnstoncontinuing to wait for new data. 1463f3c4e0bSMark Johnston.It Fl A 1473f3c4e0bSMark JohnstonGenerate directives for anonymous tracing and write them to 1483f3c4e0bSMark Johnston.Pa /boot/dtrace.dof . 1493f3c4e0bSMark JohnstonThis option constructs a set of dtrace configuration file directives to enable 1503f3c4e0bSMark Johnstonthe specified probes for anonymous tracing and then exits. 1513f3c4e0bSMark JohnstonBy default, 1523f3c4e0bSMark Johnston.Nm 1533f3c4e0bSMark Johnstonattempts to store the directives to the file 1543f3c4e0bSMark Johnston.Pa /boot/dtrace.dof . 1553f3c4e0bSMark JohnstonThis behavior can be modified using the 1563f3c4e0bSMark Johnston.Fl o 1573f3c4e0bSMark Johnstonoption to specify an alternate output file. 1583f3c4e0bSMark Johnston.It Fl b Ar bufsz 1593f3c4e0bSMark JohnstonSet the principal trace buffer size to 1603f3c4e0bSMark Johnston.Ar bufsz . 1613f3c4e0bSMark JohnstonThe trace buffer size can include any of the size suffixes k, m, g, or t. 1623f3c4e0bSMark JohnstonIf the buffer space cannot be allocated, 1633f3c4e0bSMark Johnston.Nm dtrace 1643f3c4e0bSMark Johnstonattempts to reduce the buffer size or exit depending on the setting of the 1653f3c4e0bSMark Johnstonbufresize property. 1663f3c4e0bSMark Johnston.It Fl c Ar cmd 1673f3c4e0bSMark JohnstonRun the specified command 1683f3c4e0bSMark Johnston.Ar cmd 1693f3c4e0bSMark Johnstonand exit upon its completion. 1703f3c4e0bSMark JohnstonIf more than one 1713f3c4e0bSMark Johnston.Fl c 1723f3c4e0bSMark Johnstonoption is present on the command line, 1733f3c4e0bSMark Johnston.Nm dtrace 1743f3c4e0bSMark Johnstonexits when all commands have exited, reporting the exit status for each child 1753f3c4e0bSMark Johnstonprocess as it terminates. 1763f3c4e0bSMark JohnstonThe process ID of the first command is made available to any D programs 1773f3c4e0bSMark Johnstonspecified on the command line or using the 1783f3c4e0bSMark Johnston.Fl s 1793f3c4e0bSMark Johnstonoption through the 1803f3c4e0bSMark Johnston.Li $target 1813f3c4e0bSMark Johnstonmacro variable. 1823f3c4e0bSMark Johnston.It Fl C 1833f3c4e0bSMark JohnstonRun the C preprocessor 1843f3c4e0bSMark Johnston.Xr cpp 1 1853f3c4e0bSMark Johnstonover D programs before compiling them. 1863f3c4e0bSMark JohnstonYou can pass options to the C preprocessor using the 1873f3c4e0bSMark Johnston.Fl D , 1883f3c4e0bSMark Johnston.Fl U , 1893f3c4e0bSMark Johnston.Fl I , 1903f3c4e0bSMark Johnstonand 1913f3c4e0bSMark Johnston.Fl H 1923f3c4e0bSMark Johnstonoptions. 1933f3c4e0bSMark JohnstonYou can select the degree of C standard conformance if you use the 1943f3c4e0bSMark Johnston.Fl X 1953f3c4e0bSMark Johnstonoption. 1963f3c4e0bSMark JohnstonFor a description of the set of tokens defined by the D compiler when invoking 1973f3c4e0bSMark Johnstonthe C preprocessor, see 1983f3c4e0bSMark Johnston.Fl X . 1991e136a9cSChristos Margiolis.It Fl d 2001e136a9cSChristos MargiolisDump the D script to standard output, after syntactic transformations have been 2011e136a9cSChristos Margiolisapplied. 2021e136a9cSChristos MargiolisFor example, if-statements in D are implemented using such transformations: a 2031e136a9cSChristos Margiolisconditional clause in a probe body is replaced at compile-time by a separate 2041e136a9cSChristos Margiolisprobe predicated on the original condition. 2053f3c4e0bSMark Johnston.It Fl D Ar name Op Ns = Ns value 2063f3c4e0bSMark JohnstonDefine 2073f3c4e0bSMark Johnston.Ar name 2083f3c4e0bSMark Johnstonwhen invoking 2093f3c4e0bSMark Johnston.Xr cpp 1 2103f3c4e0bSMark Johnston(enabled using the 2113f3c4e0bSMark Johnston.Fl C 2123f3c4e0bSMark Johnstonoption). 2133f3c4e0bSMark JohnstonIf you specify an additional 2143f3c4e0bSMark Johnston.Ar value , 2153f3c4e0bSMark Johnstonthe name is assigned the corresponding value. 2163f3c4e0bSMark JohnstonThis option passes the 2173f3c4e0bSMark Johnston.Fl D 2183f3c4e0bSMark Johnstonoption to each 2193f3c4e0bSMark Johnston.Xr cpp 1 2203f3c4e0bSMark Johnstoninvocation. 2213f3c4e0bSMark Johnston.It Fl e 2223f3c4e0bSMark JohnstonExit after compiling any requests and consuming anonymous tracing state 2233f3c4e0bSMark Johnston.Fl ( a 2243f3c4e0bSMark Johnstonoption) but prior to enabling any probes. 2253f3c4e0bSMark JohnstonYou can combine this option with the 2263f3c4e0bSMark Johnston.Fl a 2273f3c4e0bSMark Johnstonoption to print anonymous tracing data and exit. 2283f3c4e0bSMark JohnstonYou can also combine this option with D compiler options. 2293f3c4e0bSMark JohnstonThis combination verifies that the programs compile without actually executing 2303f3c4e0bSMark Johnstonthem and enabling the corresponding instrumentation. 2313f3c4e0bSMark Johnston.It Fl f Oo Oo Ar provider : Oc Ar module : Oc Ar function Oo Oo Ar predicate \ 2323f3c4e0bSMark Johnston Oc Ar action Oc 2333f3c4e0bSMark JohnstonSpecify function name to trace or list 2343f3c4e0bSMark Johnston.Fl ( l 2353f3c4e0bSMark Johnstonoption). 2363f3c4e0bSMark JohnstonThe corresponding argument can include any of the probe description forms 2373f3c4e0bSMark Johnston.Ar provider:module:function , 2383f3c4e0bSMark Johnston.Ar module:function , 2393f3c4e0bSMark Johnstonor 2403f3c4e0bSMark Johnston.Ar function . 2413f3c4e0bSMark JohnstonUnspecified probe description fields are left blank and match any probes 2423f3c4e0bSMark Johnstonregardless of the values in those fields. 2433f3c4e0bSMark JohnstonIf no qualifiers other than 2443f3c4e0bSMark Johnston.Ar function 2453f3c4e0bSMark Johnstonare specified in the description, all probes with the corresponding 2463f3c4e0bSMark Johnston.Ar function 2473f3c4e0bSMark Johnstonare matched. 2483f3c4e0bSMark JohnstonThe 2493f3c4e0bSMark Johnston.Fl f 2503f3c4e0bSMark Johnstonargument can be suffixed with an optional D probe clause. 2513f3c4e0bSMark JohnstonYou can specify more than one 2523f3c4e0bSMark Johnston.Fl f 2533f3c4e0bSMark Johnstonoption on the command line at a time. 2543f3c4e0bSMark Johnston.It Fl F 2553f3c4e0bSMark JohnstonCoalesce trace output by identifying function entry and return. 2563f3c4e0bSMark JohnstonFunction entry probe reports are indented and their output is prefixed with 2573f3c4e0bSMark Johnston.Ql -> . 2583f3c4e0bSMark JohnstonFunction return probe reports are unindented and their output is prefixed with 2593f3c4e0bSMark Johnston.Ql <- . 2603f3c4e0bSMark JohnstonSystem call entry probe reports are indented and their output is prefixed with 2613f3c4e0bSMark Johnston.Ql => . 2623f3c4e0bSMark JohnstonSystem call return probe reports are unindented and their output is prefixed 2633f3c4e0bSMark Johnstonwith 2643f3c4e0bSMark Johnston.Ql <= . 2653f3c4e0bSMark Johnston.It Fl G 2663f3c4e0bSMark JohnstonGenerate an ELF file containing an embedded DTrace program. 2673f3c4e0bSMark JohnstonThe DTrace probes specified in the program are saved inside of a relocatable ELF 2683f3c4e0bSMark Johnstonobject which can be linked into another program. 2693f3c4e0bSMark JohnstonIf the 2703f3c4e0bSMark Johnston.Fl o 2713f3c4e0bSMark Johnstonoption is present, the ELF file is saved using the pathname specified as the 2723f3c4e0bSMark Johnstonargument for this operand. 2733f3c4e0bSMark JohnstonIf the 2743f3c4e0bSMark Johnston.Fl o 2753f3c4e0bSMark Johnstonoption is not present and the DTrace program is contained with a file whose name 2763f3c4e0bSMark Johnstonis 2773f3c4e0bSMark Johnston.Ar filename.d , 2783f3c4e0bSMark Johnstonthen the ELF file is saved using the name 2793f3c4e0bSMark Johnston.Ar filename.o . 2803f3c4e0bSMark JohnstonOtherwise the ELF file is saved using the name d.out. 2813f3c4e0bSMark Johnston.It Fl h 2823f3c4e0bSMark JohnstonGenerate a header file containing macros that correspond to probes in the 2833f3c4e0bSMark Johnstonspecified provider definitions. 2843f3c4e0bSMark JohnstonThis option should be used to generate a header file that is included by other 2853f3c4e0bSMark Johnstonsource files for later use with the 286946497ecSMark Johnston.Fl G 287946497ecSMark Johnstonoption. 288946497ecSMark JohnstonIf the 289946497ecSMark Johnston.Fl o 290946497ecSMark Johnstonoption is present, the header file is saved using the pathname specified as the 291946497ecSMark Johnstonargument for that option. 292946497ecSMark JohnstonIf the 293946497ecSMark Johnston.Fl o 294946497ecSMark Johnstonoption is not present and the DTrace program is contained within a file whose 295946497ecSMark Johnstonname is 296946497ecSMark Johnston.Ar filename.d , 297946497ecSMark Johnstonthen the header file is saved using the name 298946497ecSMark Johnston.Ar filename.h . 2993f3c4e0bSMark Johnston.It Fl H 3003f3c4e0bSMark JohnstonPrint the pathnames of included files when invoking 3013f3c4e0bSMark Johnston.Xr cpp 1 3023f3c4e0bSMark Johnston(enabled using the 3033f3c4e0bSMark Johnston.Fl C 3043f3c4e0bSMark Johnstonoption). 3053f3c4e0bSMark JohnstonThis option passes the 3063f3c4e0bSMark Johnston.Fl H 3073f3c4e0bSMark Johnstonoption to each 3083f3c4e0bSMark Johnston.Xr cpp 1 3093f3c4e0bSMark Johnstoninvocation, causing it to display the list of pathnames, one for each line, to 3103f3c4e0bSMark Johnstonstandard error. 3113f3c4e0bSMark Johnston.It Fl i Ar probe-id Op Oo Ar predicate Oc Ar action 3123f3c4e0bSMark JohnstonSpecify probe identifier 3133f3c4e0bSMark Johnston.Ar ( probe-id ) 3143f3c4e0bSMark Johnstonto trace or list 3153f3c4e0bSMark Johnston.Ar ( l 3163f3c4e0bSMark Johnstonoption). 3173f3c4e0bSMark JohnstonYou can specify probe IDs using decimal integers as shown by `dtrace -l`. 3183f3c4e0bSMark JohnstonThe 3193f3c4e0bSMark Johnston.Fl i 3203f3c4e0bSMark Johnstonargument can be suffixed with an optional D probe clause. 3213f3c4e0bSMark JohnstonYou can specify more than one 3223f3c4e0bSMark Johnston.Fl i 3233f3c4e0bSMark Johnstonoption at a time. 3243f3c4e0bSMark Johnston.It Fl I Ar path 3253f3c4e0bSMark JohnstonAdd the specified directory 3263f3c4e0bSMark Johnston.Ar path 3273f3c4e0bSMark Johnstonto the search path for #include files when invoking 3283f3c4e0bSMark Johnston.Xr cpp 1 3293f3c4e0bSMark Johnston(enabled using the 3303f3c4e0bSMark Johnston.Fl C 3313f3c4e0bSMark Johnstonoption). 3323f3c4e0bSMark JohnstonThis option passes the 3333f3c4e0bSMark Johnston.Fl I 3343f3c4e0bSMark Johnstonoption to each 3353f3c4e0bSMark Johnston.Xr cpp 1 3363f3c4e0bSMark Johnstoninvocation. 3373f3c4e0bSMark JohnstonThe specified 3383f3c4e0bSMark Johnston.Ar path 3393f3c4e0bSMark Johnstonis inserted into the search path ahead of the default directory list. 3403f3c4e0bSMark Johnston.It Fl l 3413f3c4e0bSMark JohnstonList probes instead of enabling them. 3423f3c4e0bSMark JohnstonIf the 3433f3c4e0bSMark Johnston.Fl l 3443f3c4e0bSMark Johnstonoption is specified, 3453f3c4e0bSMark Johnston.Nm 3463f3c4e0bSMark Johnstonproduces a report of the probes matching the descriptions given using the 3473f3c4e0bSMark Johnston.Fl P , m , f , n , i , 3483f3c4e0bSMark Johnstonand 3493f3c4e0bSMark Johnston.Fl s 3503f3c4e0bSMark Johnstonoptions. 3513f3c4e0bSMark JohnstonIf none of these options are specified, this option lists all probes. 3523f3c4e0bSMark Johnston.It Fl L Ar path 3533f3c4e0bSMark JohnstonAdd the specified directory 3543f3c4e0bSMark Johnston.Ar path 3553f3c4e0bSMark Johnstonto the search path for DTrace libraries. 3563f3c4e0bSMark JohnstonDTrace libraries are used to contain common definitions that can be used when 3573f3c4e0bSMark Johnstonwriting D programs. 3583f3c4e0bSMark JohnstonThe specified 3593f3c4e0bSMark Johnston.Ar path 3603f3c4e0bSMark Johnstonis added after the default library search path. 361*93f27766SDomagoj Stolfa.It Fl -libxo 362*93f27766SDomagoj StolfaGenerate output via 363*93f27766SDomagoj Stolfa.Xr libxo 3 . 364*93f27766SDomagoj StolfaThis option is the same as specifying 365*93f27766SDomagoj Stolfa.Sy oformat . 3663f3c4e0bSMark Johnston.It Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc 3673f3c4e0bSMark JohnstonSpecify module name to trace or list 3683f3c4e0bSMark Johnston.Fl ( l 3693f3c4e0bSMark Johnstonoption). 3703f3c4e0bSMark JohnstonThe corresponding argument can include any of the probe description forms 3713f3c4e0bSMark Johnston.Ar provider:module 3723f3c4e0bSMark Johnstonor 3733f3c4e0bSMark Johnston.Ar module . 3743f3c4e0bSMark JohnstonUnspecified probe description fields are left blank and match any probes 3753f3c4e0bSMark Johnstonregardless of the values in those fields. 3763f3c4e0bSMark JohnstonIf no qualifiers other than 3773f3c4e0bSMark Johnston.Ar module 3783f3c4e0bSMark Johnstonare specified in the description, all probes with a corresponding 3793f3c4e0bSMark Johnston.Ar module 3803f3c4e0bSMark Johnstonare matched. 3813f3c4e0bSMark JohnstonThe 3823f3c4e0bSMark Johnston.Fl m 3833f3c4e0bSMark Johnstonargument can be suffixed with an optional D probe clause. 3843f3c4e0bSMark JohnstonMore than one 3853f3c4e0bSMark Johnston.Fl m 3863f3c4e0bSMark Johnstonoption can be specified on the command line at a time. 3873f3c4e0bSMark Johnston.It Fl n Oo Oo Oo Ar provider : Oc Ar module : Oc Ar function : Oc Ar name \ 3883f3c4e0bSMark Johnston Oo Oo Ar predicate Oc Ar action Oc 3893f3c4e0bSMark JohnstonSpecify probe name to trace or list 3903f3c4e0bSMark Johnston.Fl ( l 3913f3c4e0bSMark Johnstonoption). 3923f3c4e0bSMark JohnstonThe corresponding argument can include any of the probe description forms 3933f3c4e0bSMark Johnston.Ar provider:module:function:name , module:function:name , function:name , 3943f3c4e0bSMark Johnstonor 3953f3c4e0bSMark Johnston.Ar name . 3963f3c4e0bSMark JohnstonUnspecified probe description fields are left blank and match any probes 3973f3c4e0bSMark Johnstonregardless of the values in those fields. 3983f3c4e0bSMark JohnstonIf no qualifiers other than 3993f3c4e0bSMark Johnston.Ar name 4003f3c4e0bSMark Johnstonare specified in the description, all probes with a corresponding 4013f3c4e0bSMark Johnston.Ar name 4023f3c4e0bSMark Johnstonare matched. 4033f3c4e0bSMark JohnstonThe 4043f3c4e0bSMark Johnston.Fl n 4053f3c4e0bSMark Johnstonargument can be suffixed with an optional D probe clause. 4063f3c4e0bSMark JohnstonMore than one 4073f3c4e0bSMark Johnston.Fl n 4083f3c4e0bSMark Johnstonoption can be specified on the command line at a time. 409*93f27766SDomagoj Stolfa.It Fl O 410*93f27766SDomagoj StolfaThis option causes 411*93f27766SDomagoj Stolfa.Nm 412*93f27766SDomagoj Stolfato print all the aggregations upon exiting if 413*93f27766SDomagoj Stolfa.Sy oformat 414*93f27766SDomagoj Stolfaor 415*93f27766SDomagoj Stolfa.Fl -libxo 416*93f27766SDomagoj Stolfaare specified. 4173f3c4e0bSMark Johnston.It Fl o Ar output 4183f3c4e0bSMark JohnstonSpecify the 4193f3c4e0bSMark Johnston.Ar output 4203f3c4e0bSMark Johnstonfile for the 4213f3c4e0bSMark Johnston.Fl A , G , 4223f3c4e0bSMark Johnstonand 4233f3c4e0bSMark Johnston.Fl l 4243f3c4e0bSMark Johnstonoptions, or for the traced data itself. 4253f3c4e0bSMark JohnstonIf the 4263f3c4e0bSMark Johnston.Fl A 4273f3c4e0bSMark Johnstonoption is present and 4283f3c4e0bSMark Johnston.Fl o 4293f3c4e0bSMark Johnstonis not present, the default output file is 4303f3c4e0bSMark Johnston.Pa /boot/dtrace.dof . 4313f3c4e0bSMark JohnstonIf the 4323f3c4e0bSMark Johnston.Fl G 4333f3c4e0bSMark Johnstonoption is present and the 4343f3c4e0bSMark Johnston.Fl s 4353f3c4e0bSMark Johnstonoption's argument is of the form 4363f3c4e0bSMark Johnston.Ar filename.d 4373f3c4e0bSMark Johnstonand 4383f3c4e0bSMark Johnston.Fl o 4393f3c4e0bSMark Johnstonis not present, the default output file is 4403f3c4e0bSMark Johnston.Ar filename.o . 4413f3c4e0bSMark JohnstonOtherwise the default output file is 4423f3c4e0bSMark Johnston.Ar d.out . 4433f3c4e0bSMark Johnston.It Fl p Ar pid 4443f3c4e0bSMark JohnstonGrab the specified process-ID 4453f3c4e0bSMark Johnston.Ar pid , 4463f3c4e0bSMark Johnstoncache its symbol tables, and exit upon its completion. 4473f3c4e0bSMark JohnstonIf more than one 4483f3c4e0bSMark Johnston.Fl p 4493f3c4e0bSMark Johnstonoption is present on the command line, 4503f3c4e0bSMark Johnston.Nm 4513f3c4e0bSMark Johnstonexits when all commands have exited, reporting the exit status for each process 4523f3c4e0bSMark Johnstonas it terminates. 4533f3c4e0bSMark JohnstonThe first process-ID is made available to any D programs specified on the 4543f3c4e0bSMark Johnstoncommand line or using the 4553f3c4e0bSMark Johnston.Fl s 4563f3c4e0bSMark Johnstonoption through the 4573f3c4e0bSMark Johnston.Li $target 4583f3c4e0bSMark Johnstonmacro variable. 4593f3c4e0bSMark Johnston.It Fl P Ar provider Oo Oo Ar predicate Oc Ar action Oc 4603f3c4e0bSMark JohnstonSpecify provider name to trace or list 4613f3c4e0bSMark Johnston.Fl ( l 4623f3c4e0bSMark Johnstonoption). 4633f3c4e0bSMark JohnstonThe remaining probe description fields module, function, and name are left 4643f3c4e0bSMark Johnstonblank and match any probes regardless of the values in those fields. 4653f3c4e0bSMark JohnstonThe 4663f3c4e0bSMark Johnston.Fl P 4673f3c4e0bSMark Johnstonargument can be suffixed with an optional D probe clause. 4683f3c4e0bSMark JohnstonYou can specify more than one 4693f3c4e0bSMark Johnston.Fl P 4703f3c4e0bSMark Johnstonoption on the command line at a time. 4713f3c4e0bSMark Johnston.It Fl q 4723f3c4e0bSMark JohnstonSet quiet mode. 4733f3c4e0bSMark Johnston.Nm 4743f3c4e0bSMark Johnstonsuppresses messages such as the number of probes matched by the specified 4753f3c4e0bSMark Johnstonoptions and D programs and does not print column headers, the CPU ID, the probe 4763f3c4e0bSMark JohnstonID, or insert newlines into the output. 4773f3c4e0bSMark JohnstonOnly data traced and formatted by D program statements such as 4783f3c4e0bSMark Johnston.Ql dtrace() 4793f3c4e0bSMark Johnstonand 4803f3c4e0bSMark Johnston.Ql printf() 4813f3c4e0bSMark Johnstonis displayed to standard output. 4823f3c4e0bSMark Johnston.It Fl s Ar script 4833f3c4e0bSMark JohnstonCompile the specified D program source file. 4843f3c4e0bSMark JohnstonIf the 4853f3c4e0bSMark Johnston.Fl e 4863f3c4e0bSMark Johnstonoption is present, the program is compiled but instrumentation is not enabled. 4873f3c4e0bSMark JohnstonIf the 4883f3c4e0bSMark Johnston.Fl l 4893f3c4e0bSMark Johnstonoption is present, the program is compiled and the set of probes matched by it 4903f3c4e0bSMark Johnstonis listed, but instrumentation is not enabled. 4913f3c4e0bSMark JohnstonIf none of 4923f3c4e0bSMark Johnston.Fl e , l , G , 4933f3c4e0bSMark Johnstonor 4943f3c4e0bSMark Johnston.Fl A 4953f3c4e0bSMark Johnstonare present, the instrumentation specified by the D program is enabled and 4963f3c4e0bSMark Johnstontracing begins. 4973f3c4e0bSMark Johnston.It Fl S 4983f3c4e0bSMark JohnstonShow D compiler intermediate code. 4993f3c4e0bSMark JohnstonThe D compiler produces a report of the intermediate code generated for each D 5003f3c4e0bSMark Johnstonprogram to standard error. 5013f3c4e0bSMark Johnston.It Fl U Ar name 5023f3c4e0bSMark JohnstonUndefine the specified 5033f3c4e0bSMark Johnston.Ar name 5043f3c4e0bSMark Johnstonwhen invoking 5053f3c4e0bSMark Johnston.Xr cpp 1 5063f3c4e0bSMark Johnston(enabled using the 5073f3c4e0bSMark Johnston.Fl C 5083f3c4e0bSMark Johnstonoption). 5093f3c4e0bSMark JohnstonThis option passes the 5103f3c4e0bSMark Johnston.Fl U 5113f3c4e0bSMark Johnstonoption to each 5123f3c4e0bSMark Johnston.Xr cpp 1 5133f3c4e0bSMark Johnstoninvocation. 5143f3c4e0bSMark Johnston.It Fl v 5153f3c4e0bSMark JohnstonSet verbose mode. 5163f3c4e0bSMark JohnstonIf the 5173f3c4e0bSMark Johnston.Fl v 5183f3c4e0bSMark Johnstonoption is specified, 5193f3c4e0bSMark Johnston.Nm 5203f3c4e0bSMark Johnstonproduces a program stability report showing the minimum interface stability and 5213f3c4e0bSMark Johnstondependency level for the specified D programs. 5223f3c4e0bSMark Johnston.It Fl V 5233f3c4e0bSMark JohnstonReport the highest D programming interface version supported by 5243f3c4e0bSMark Johnston.Nm . 5253f3c4e0bSMark JohnstonThe version information is printed to standard output and the 5263f3c4e0bSMark Johnston.Nm 5273f3c4e0bSMark Johnstoncommand exits. 5283f3c4e0bSMark Johnston.It Fl w 5293f3c4e0bSMark JohnstonPermit destructive actions in D programs specified using the 5303f3c4e0bSMark Johnston.Fl s , P , m , f , n , 5313f3c4e0bSMark Johnstonor 5323f3c4e0bSMark Johnston.Fl i 5333f3c4e0bSMark Johnstonoptions. 5343f3c4e0bSMark JohnstonIf the 5353f3c4e0bSMark Johnston.Fl w 5363f3c4e0bSMark Johnstonoption is not specified, 5373f3c4e0bSMark Johnston.Nm 5383f3c4e0bSMark Johnstondoes not permit the compilation or enabling of a D program that contains 5393f3c4e0bSMark Johnstondestructive actions. 5403f3c4e0bSMark Johnston.It Fl x Ar arg Op Ns = Ns value 5413f3c4e0bSMark JohnstonEnable or modify a DTrace runtime option or D compiler option. 5423f3c4e0bSMark JohnstonBoolean options are enabled by specifying their name. 5433f3c4e0bSMark JohnstonOptions with values are set by separating the option name and value with an 5443f3c4e0bSMark Johnstonequals sign (=). 545f0af0b31SMark Johnston.Pp 546f0af0b31SMark JohnstonA 547f0af0b31SMark Johnston.Ar size 548f0af0b31SMark Johnstonargument may be suffixed with one of 549f0af0b31SMark Johnston.Cm K , 550f0af0b31SMark Johnston.Cm M , 551f0af0b31SMark Johnston.Cm G 552f0af0b31SMark Johnstonor 553f0af0b31SMark Johnston.Cm T 554f0af0b31SMark Johnston(either upper or lower case) to indicate a multiple of 555f0af0b31SMark JohnstonKilobytes, Megabytes, Gigabytes or Terabytes 556f0af0b31SMark Johnstonrespectively. 557f0af0b31SMark Johnston.Pp 558f0af0b31SMark JohnstonA 559f0af0b31SMark Johnston.Ar time 560f0af0b31SMark Johnstonargument may be suffixed with one of 561f0af0b31SMark Johnston.Cm ns , 562f0af0b31SMark Johnston.Cm nsec , 563f0af0b31SMark Johnston.Cm us , 564f0af0b31SMark Johnston.Cm usec , 565f0af0b31SMark Johnston.Cm ms , 566f0af0b31SMark Johnston.Cm msec , 567f0af0b31SMark Johnston.Cm s , 568f0af0b31SMark Johnston.Cm sec , 569f0af0b31SMark Johnston.Cm m , 570f0af0b31SMark Johnston.Cm min , 571f0af0b31SMark Johnston.Cm h , 572f0af0b31SMark Johnston.Cm hour , 573f0af0b31SMark Johnston.Cm d , 574f0af0b31SMark Johnston.Cm day , 575f0af0b31SMark Johnston.Cm hz . 576f0af0b31SMark JohnstonIf no suffix is specified 577f0af0b31SMark Johnston.Cm hz 578f0af0b31SMark Johnstonwill be used as the unit. 579f0af0b31SMark Johnston.Bl -tag -width indent 580f0af0b31SMark Johnston.It Sy aggrate Ns = Ns Ar time 581f0af0b31SMark JohnstonRate of aggregation reading. 582f0af0b31SMark Johnston.It Sy aggsize Ns = Ns Ar size 583f0af0b31SMark JohnstonSize of the aggregation buffer. 584f0af0b31SMark Johnston.It Sy bufpolicy Ns = Ns Cm fill Ns | Ns Cm switch Ns | Ns Cm ring 585f0af0b31SMark JohnstonSpecifies the buffer policy for the principal buffer. 586f0af0b31SMark Johnston.It Sy bufresize Ns = Ns Cm auto Ns | Ns Cm manual 587f0af0b31SMark JohnstonBuffer resizing policy. 588f0af0b31SMark Johnston.It Sy bufsize Ns = Ns Ar size 589f0af0b31SMark JohnstonSize of the per-CPU principal buffer. 590f0af0b31SMark JohnstonSame as the 591f0af0b31SMark Johnston.Fl b 592f0af0b31SMark Johnstonflag. 593f0af0b31SMark Johnston.It Sy cleanrate Ns = Ns Ar time 594f0af0b31SMark JohnstonCleaning rate. 595f0af0b31SMark JohnstonMust be specified in number-per-second with the 596f0af0b31SMark Johnston.Dq Li hz 597f0af0b31SMark Johnstonsuffix. 598f0af0b31SMark Johnston.It Sy cpu Ns = Ns Ar scalar 599f0af0b31SMark JohnstonSpecifies the CPU on which to enable tracing. 600a40c4ae8SMark Johnston.It Sy cpp 601a40c4ae8SMark JohnstonRun a C preprocessor over input files. 602a40c4ae8SMark JohnstonSame as the 603a40c4ae8SMark Johnston.Fl C 604a40c4ae8SMark Johnstonflag. 605a40c4ae8SMark Johnston.It Sy cpppath Ns = Ns Ar path 606a40c4ae8SMark JohnstonUse the specified path for the C preprocessor rather than 607a40c4ae8SMark Johnstonsearching for 608a40c4ae8SMark Johnston.Dq cpp 609a40c4ae8SMark Johnstonin 610a40c4ae8SMark Johnston.Ev PATH . 611f0af0b31SMark Johnston.It Sy defaultargs 612f0af0b31SMark JohnstonAllow references to unspecified macro arguments. 613f0af0b31SMark Johnston.It Sy destructive 614f0af0b31SMark JohnstonAllow destructive actions. 615f0af0b31SMark JohnstonSame as the 616f0af0b31SMark Johnston.Fl w 617f0af0b31SMark Johnstonflag. 618f0af0b31SMark Johnston.It Sy dynvarsize Ns = Ns Ar size 619f0af0b31SMark JohnstonSize of the dynamic variable space. 620f0af0b31SMark Johnston.It Sy flowindent 621f0af0b31SMark JohnstonTurn on flow indentation. 622f0af0b31SMark JohnstonSame as the 623f0af0b31SMark Johnston.Fl F 624f0af0b31SMark Johnstonflag. 625f0af0b31SMark Johnston.It Sy grabanon 626f0af0b31SMark JohnstonClaim anonymous state. 627f0af0b31SMark JohnstonSame as the 628f0af0b31SMark Johnston.Fl a 629f0af0b31SMark Johnstonflag. 630f0af0b31SMark Johnston.It Sy jstackframes Ns = Ns Ar scalar 631f0af0b31SMark JohnstonNumber of default stack frames for 632f0af0b31SMark Johnston.Fn jstack . 633f0af0b31SMark Johnston.It Sy jstackstrsize Ns = Ns Ar scalar 634f0af0b31SMark JohnstonDefault string space size for 635f0af0b31SMark Johnston.Fn jstack . 63613d9437aSMark Johnston.It Sy ldpath Ns = Ns Ar path 63713d9437aSMark JohnstonWhen 63813d9437aSMark Johnston.Fl G 63913d9437aSMark Johnstonis specified, use the specified path for a static linker 64013d9437aSMark Johnstonrather than searching for 64113d9437aSMark Johnston.Dq "ld" 64213d9437aSMark Johnstonin 64313d9437aSMark Johnston.Ev PATH . 6447653f931SDomagoj Stolfa.It Sy libdir Ns = Ns Ar path 6457653f931SDomagoj StolfaAdd a directory to the system library path. 646f0af0b31SMark Johnston.It Sy nspec Ns = Ns Ar scalar 647f0af0b31SMark JohnstonNumber of speculations. 6487653f931SDomagoj Stolfa.It Sy nolibs 6497653f931SDomagoj StolfaDo not load D system libraries. 650f0af0b31SMark Johnston.It Sy quiet 651f0af0b31SMark JohnstonSet quiet mode. 652f0af0b31SMark JohnstonSame as the 653f0af0b31SMark Johnston.Fl q 654f0af0b31SMark Johnstonflag. 655f0af0b31SMark Johnston.It Sy specsize Ns = Ns Ar size 656f0af0b31SMark JohnstonSize of the speculation buffer. 657f0af0b31SMark Johnston.It Sy strsize Ns = Ns Ar size 658f0af0b31SMark JohnstonMaximum size of strings. 659f0af0b31SMark Johnston.It Sy stackframes Ns = Ns Ar scalar 660f0af0b31SMark JohnstonMaximum number of kernelspace stack frames to unwind when executing the 661f0af0b31SMark Johnston.Fn stack 662f0af0b31SMark Johnstonaction. 663f0af0b31SMark Johnston.It Sy stackindent Ns = Ns Ar scalar 664f0af0b31SMark JohnstonNumber of whitespace characters to use when indenting 665f0af0b31SMark Johnston.Fn stack 666f0af0b31SMark Johnstonand 667f0af0b31SMark Johnston.Fn ustack 668f0af0b31SMark Johnstonoutput. 669*93f27766SDomagoj Stolfa.It Sy oformat Ns = Ns Ar format 670*93f27766SDomagoj StolfaSpecify the format to use for output. 671*93f27766SDomagoj StolfaSetting 672*93f27766SDomagoj Stolfa.Sy oformat 673*93f27766SDomagoj Stolfato 674*93f27766SDomagoj Stolfa.Ql text 675*93f27766SDomagoj Stolfamakes 676*93f27766SDomagoj Stolfa.Nm 677*93f27766SDomagoj Stolfause regular human-readable output which is its default behavior. 678*93f27766SDomagoj StolfaThe options passed to 679*93f27766SDomagoj Stolfa.Sy oformat 680*93f27766SDomagoj Stolfaare directly forwarded to 681*93f27766SDomagoj Stolfa.Xr libxo 3 . 682*93f27766SDomagoj StolfaSome of the supported formatters include 683*93f27766SDomagoj Stolfa.Ql json , 684*93f27766SDomagoj Stolfa.Ql xml 685*93f27766SDomagoj Stolfaand 686*93f27766SDomagoj Stolfa.Ql html . 687*93f27766SDomagoj StolfaNote that this option will cause 688*93f27766SDomagoj Stolfa.Nm 689*93f27766SDomagoj Stolfato not produce any output unless printing functions are explicitly called, 690*93f27766SDomagoj Stolfaor the 691*93f27766SDomagoj Stolfa.Fl O 692*93f27766SDomagoj Stolfaflag is specified. 693*93f27766SDomagoj StolfaFor more information see 694*93f27766SDomagoj Stolfa.Sx STRUCTURED OUTPUT . 695f0af0b31SMark Johnston.It Sy statusrate Ns = Ns Ar time 696f0af0b31SMark JohnstonRate of status checking. 697f0af0b31SMark Johnston.It Sy switchrate Ns = Ns Ar time 698f0af0b31SMark JohnstonRate of buffer switching. 6997653f931SDomagoj Stolfa.It Sy syslibdir Ns = Ns Ar path 7007653f931SDomagoj StolfaPath to system libraries. 7017653f931SDomagoj StolfaDefaults to 7027653f931SDomagoj Stolfa.Pa /usr/lib/dtrace . 703f0af0b31SMark Johnston.It Sy ustackframes Ns = Ns Ar scalar 704f0af0b31SMark JohnstonMaximum number of userspace stack frames to unwind when executing the 705f0af0b31SMark Johnston.Fn ustack 706f0af0b31SMark Johnstonaction. 707f0af0b31SMark Johnston.El 7083f3c4e0bSMark Johnston.It Fl X Cm a | c | s | t 7093f3c4e0bSMark JohnstonSpecify the degree of conformance to the ISO C standard that should be selected 7103f3c4e0bSMark Johnstonwhen invoking 7113f3c4e0bSMark Johnston.Xr cpp 1 7123f3c4e0bSMark Johnston(enabled using the 7133f3c4e0bSMark Johnston.Fl C 7143f3c4e0bSMark Johnstonoption). 7153f3c4e0bSMark JohnstonThe 7163f3c4e0bSMark Johnston.Fl X 7173f3c4e0bSMark Johnstonoption argument affects the value and presence of the __STDC__ macro depending 7183f3c4e0bSMark Johnstonupon the value of the argument letter. 7192be1a816SJohn Birrell.sp 7203f3c4e0bSMark JohnstonThe 7213f3c4e0bSMark Johnston.Fl X 7223f3c4e0bSMark Johnstonoption supports the following arguments: 7233f3c4e0bSMark Johnston.Bl -tag -width indent 7243f3c4e0bSMark Johnston.It a 7253f3c4e0bSMark JohnstonDefault. 7263f3c4e0bSMark JohnstonISO C plus K&R compatibility extensions, with semantic changes required by ISO 7273f3c4e0bSMark JohnstonC. 7283f3c4e0bSMark JohnstonThis is the default mode if 7293f3c4e0bSMark Johnston.Fl X 7303f3c4e0bSMark Johnstonis not specified. 7313f3c4e0bSMark JohnstonThe predefined macro __STDC__ has a value of 0 when 7323f3c4e0bSMark Johnston.Xr cpp 1 7333f3c4e0bSMark Johnstonis invoked in conjunction with the 7343f3c4e0bSMark Johnston.Fl Xa 7353f3c4e0bSMark Johnstonoption. 7363f3c4e0bSMark Johnston.It c 7373f3c4e0bSMark JohnstonConformance. 7383f3c4e0bSMark JohnstonStrictly conformant ISO C, without K&R C compatibility extensions. 7393f3c4e0bSMark JohnstonThe predefined macro __STDC__ has a value of 1 when 7403f3c4e0bSMark Johnston.Xr cpp 1 7413f3c4e0bSMark Johnstonis invoked in conjunction with the 7423f3c4e0bSMark Johnston.Fl \&Xc 7433f3c4e0bSMark Johnstonoption. 7443f3c4e0bSMark Johnston.It s 7453f3c4e0bSMark JohnstonK&R C only. 7463f3c4e0bSMark JohnstonThe macro __STDC__ is not defined when 7473f3c4e0bSMark Johnston.Xr cpp 1 7483f3c4e0bSMark Johnstonis invoked in conjunction with the 7493f3c4e0bSMark Johnston.Fl Xs 7503f3c4e0bSMark Johnstonoption. 7513f3c4e0bSMark Johnston.It t 7523f3c4e0bSMark JohnstonTransition. 7533f3c4e0bSMark JohnstonISO C plus K&R C compatibility extensions, without semantic changes required by 7543f3c4e0bSMark JohnstonISO C. 7553f3c4e0bSMark JohnstonThe predefined macro __STDC__ has a value of 0 when 7563f3c4e0bSMark Johnston.Xr cpp 1 7573f3c4e0bSMark Johnstonis invoked in conjunction with the 7583f3c4e0bSMark Johnston.Fl Xt 7593f3c4e0bSMark Johnstonoption. 7603f3c4e0bSMark Johnston.El 7613f3c4e0bSMark Johnston.Pp 7623f3c4e0bSMark JohnstonAs the 7633f3c4e0bSMark Johnston.Fl X 7643f3c4e0bSMark Johnstonoption only affects how the D compiler invokes the C preprocessor, the 7653f3c4e0bSMark Johnston.Fl Xa 7663f3c4e0bSMark Johnstonand 7673f3c4e0bSMark Johnston.Fl Xt 7683f3c4e0bSMark Johnstonoptions are equivalent from the perspective of D and both are provided only to 7693f3c4e0bSMark Johnstonease re-use of settings from a C build environment. 7703f3c4e0bSMark Johnston.Pp 7713f3c4e0bSMark JohnstonRegardless of the 7723f3c4e0bSMark Johnston.Fl X 7733f3c4e0bSMark Johnstonmode, the following additional C preprocessor definitions are always specified 7743f3c4e0bSMark Johnstonand valid in all modes: 7753f3c4e0bSMark Johnston.Bl -bullet -offset indent 7763f3c4e0bSMark Johnston.It 7773f3c4e0bSMark Johnston__sun 7783f3c4e0bSMark Johnston.It 7793f3c4e0bSMark Johnston__unix 7803f3c4e0bSMark Johnston.It 7813f3c4e0bSMark Johnston__SVR4 7823f3c4e0bSMark Johnston.It 7833f3c4e0bSMark Johnston__sparc (on SPARC systems only) 7843f3c4e0bSMark Johnston.It 7853f3c4e0bSMark Johnston__sparcv9 (on SPARC systems only when 64-bit programs are compiled) 7863f3c4e0bSMark Johnston.It 7873f3c4e0bSMark Johnston__i386 (on x86 systems only when 32-bit programs are compiled) 7883f3c4e0bSMark Johnston.It 7893f3c4e0bSMark Johnston__amd64 (on x86 systems only when 64-bit programs are compiled) 7903f3c4e0bSMark Johnston.It 7913f3c4e0bSMark Johnston__`uname -s`_`uname -r` (for example, 7923f3c4e0bSMark Johnston.Ql FreeBSD_9.2-RELEASE . 7933f3c4e0bSMark Johnston.It 7943f3c4e0bSMark Johnston__SUNW_D=1 7953f3c4e0bSMark Johnston.It 7963f3c4e0bSMark Johnston.No __SUNW_D_VERSION=0x Ns Ar MMmmmuuu 7973f3c4e0bSMark Johnston.Pp 7983f3c4e0bSMark JohnstonWhere 7993f3c4e0bSMark Johnston.Ar MM 8003f3c4e0bSMark Johnstonis the major release value in hexadecimal, 8013f3c4e0bSMark Johnston.Ar mmm 8023f3c4e0bSMark Johnstonis the minor release value in hexadecimal, and 8033f3c4e0bSMark Johnston.Ar uuu 8043f3c4e0bSMark Johnstonis the micro release value in hexadecimal. 8053f3c4e0bSMark Johnston.El 8063f3c4e0bSMark Johnston.It Fl Z 8073f3c4e0bSMark JohnstonPermit probe descriptions that match zero probes. 8083f3c4e0bSMark JohnstonIf the 8093f3c4e0bSMark Johnston.Fl Z 8103f3c4e0bSMark Johnstonoption is not specified, 8113f3c4e0bSMark Johnston.Nm 8123f3c4e0bSMark Johnstonreports an error and exits if any probe descriptions specified in D program 8133f3c4e0bSMark Johnstonfiles 8143f3c4e0bSMark Johnston.Fl ( s 8153f3c4e0bSMark Johnstonoption) or on the command line 8163f3c4e0bSMark Johnston.Fl ( P , m , f , n , 8173f3c4e0bSMark Johnstonor 8183f3c4e0bSMark Johnston.Fl i 8193f3c4e0bSMark Johnstonoptions) contain descriptions that do not match any known probes. 8203f3c4e0bSMark Johnston.El 821*93f27766SDomagoj Stolfa.Sh STRUCTURED OUTPUT 822*93f27766SDomagoj Stolfa.Nm 823*93f27766SDomagoj Stolfasupports structured output using 824*93f27766SDomagoj Stolfa.Xr libxo 3 . 825*93f27766SDomagoj StolfaThe output will always have a top-level object called 826*93f27766SDomagoj Stolfa.Dq dtrace , 827*93f27766SDomagoj Stolfafollowed by a list of objects 828*93f27766SDomagoj Stolfa.Dq probes . 829*93f27766SDomagoj StolfaEach of the probe objects will to have a timestamp which is generated at 830*93f27766SDomagoj Stolfaoutput time rather than probe firing time, an identifier for the CPU on 831*93f27766SDomagoj Stolfawhich the probe was executed, and the probe's full specification: 832*93f27766SDomagoj Stolfa.Bd -literal 833*93f27766SDomagoj Stolfa{ 834*93f27766SDomagoj Stolfa "dtrace": { 835*93f27766SDomagoj Stolfa "probes": [ 836*93f27766SDomagoj Stolfa { 837*93f27766SDomagoj Stolfa "timestamp": ..., 838*93f27766SDomagoj Stolfa "cpu": ..., 839*93f27766SDomagoj Stolfa "id": ..., 840*93f27766SDomagoj Stolfa "provider": ..., 841*93f27766SDomagoj Stolfa "module": ..., 842*93f27766SDomagoj Stolfa "function": ..., 843*93f27766SDomagoj Stolfa "name": ..., 844*93f27766SDomagoj Stolfa "output": [ 845*93f27766SDomagoj Stolfa ... (script-specific output) 846*93f27766SDomagoj Stolfa ] 847*93f27766SDomagoj Stolfa } 848*93f27766SDomagoj Stolfa ] 849*93f27766SDomagoj Stolfa } 850*93f27766SDomagoj Stolfa} 851*93f27766SDomagoj Stolfa 852*93f27766SDomagoj Stolfa<?xml version="1.0"?> 853*93f27766SDomagoj Stolfa<dtrace> 854*93f27766SDomagoj Stolfa <probes> 855*93f27766SDomagoj Stolfa <timestamp>...</timestamp> 856*93f27766SDomagoj Stolfa <cpu>...</cpu> 857*93f27766SDomagoj Stolfa <id>...</id> 858*93f27766SDomagoj Stolfa <provider>...</provider> 859*93f27766SDomagoj Stolfa <module>...</module> 860*93f27766SDomagoj Stolfa <function>...</function> 861*93f27766SDomagoj Stolfa <name>...</name> 862*93f27766SDomagoj Stolfa <output> 863*93f27766SDomagoj Stolfa ... (script-specific output) 864*93f27766SDomagoj Stolfa </output> 865*93f27766SDomagoj Stolfa </probes> 866*93f27766SDomagoj Stolfa</dtrace> 867*93f27766SDomagoj Stolfa.Ed 868*93f27766SDomagoj Stolfa.Pp 869*93f27766SDomagoj StolfaIt is also possible for XML output to take the following form if some 870*93f27766SDomagoj Stolfaof the fields are empty (in this example, module and function values 871*93f27766SDomagoj Stolfaare absent): 872*93f27766SDomagoj Stolfa.Bd -literal 873*93f27766SDomagoj Stolfa<?xml version="1.0"?> 874*93f27766SDomagoj Stolfa<dtrace> 875*93f27766SDomagoj Stolfa <probes> 876*93f27766SDomagoj Stolfa ... 877*93f27766SDomagoj Stolfa <module/> 878*93f27766SDomagoj Stolfa <function/> 879*93f27766SDomagoj Stolfa ... 880*93f27766SDomagoj Stolfa <output> 881*93f27766SDomagoj Stolfa ... (script-specific output) 882*93f27766SDomagoj Stolfa </output> 883*93f27766SDomagoj Stolfa </probes> 884*93f27766SDomagoj Stolfa</dtrace> 885*93f27766SDomagoj Stolfa.Ed 886*93f27766SDomagoj Stolfa.Pp 887*93f27766SDomagoj StolfaSimilarly, 888*93f27766SDomagoj Stolfa.Sy oformat 889*93f27766SDomagoj Stolfacan be used to generate HTML: 890*93f27766SDomagoj Stolfa.Bd -literal 891*93f27766SDomagoj Stolfa<div class="line"> 892*93f27766SDomagoj Stolfa<div class="data" data-tag="timestamp">...</div> 893*93f27766SDomagoj Stolfa<div class="text"></div> 894*93f27766SDomagoj Stolfa<div class="data" data-tag="cpu">...</div> 895*93f27766SDomagoj Stolfa<div class="text"></div> 896*93f27766SDomagoj Stolfa<div class="data" data-tag="id">...</div> 897*93f27766SDomagoj Stolfa<div class="text"></div> 898*93f27766SDomagoj Stolfa<div class="data" data-tag="provider">...</div> 899*93f27766SDomagoj Stolfa<div class="text"></div> 900*93f27766SDomagoj Stolfa<div class="data" data-tag="module">...</div> 901*93f27766SDomagoj Stolfa<div class="text"></div> 902*93f27766SDomagoj Stolfa<div class="data" data-tag="function">...</div> 903*93f27766SDomagoj Stolfa<div class="text"></div> 904*93f27766SDomagoj Stolfa<div class="data" data-tag="name">...</div> 905*93f27766SDomagoj Stolfa<div class="data" data-tag="... (script-specific output)">...</div> 906*93f27766SDomagoj Stolfa</div> 907*93f27766SDomagoj Stolfa.Ed 908*93f27766SDomagoj Stolfa.Pp 909*93f27766SDomagoj StolfaUnlike JSON and XML, the 910*93f27766SDomagoj Stolfa.Dq output 911*93f27766SDomagoj Stolfaarray is not present. 912*93f27766SDomagoj StolfaInstead, data is simply formatted into a div of class 913*93f27766SDomagoj Stolfa.Dq data 914*93f27766SDomagoj Stolfaand a data-tag is associated with each of the keys. 915*93f27766SDomagoj Stolfa.Pp 916*93f27766SDomagoj StolfaThe 917*93f27766SDomagoj Stolfa.Dq output 918*93f27766SDomagoj Stolfaarray's contents depend on the probes' actions and is explained below. 919*93f27766SDomagoj StolfaThe examples here are presented in JSON form as opposed to XML or HTML, 920*93f27766SDomagoj Stolfahowever the conversion explained above applies for all output formats. 921*93f27766SDomagoj Stolfa.Pp 922*93f27766SDomagoj StolfaAny scalar output, such as output produced by the 923*93f27766SDomagoj Stolfa.Fn trace 924*93f27766SDomagoj Stolfaaction is of form: 925*93f27766SDomagoj Stolfa.Bd -literal 926*93f27766SDomagoj Stolfa{ 927*93f27766SDomagoj Stolfa "value": ... 928*93f27766SDomagoj Stolfa} 929*93f27766SDomagoj Stolfa.Ed 930*93f27766SDomagoj Stolfa.Pp 931*93f27766SDomagoj StolfaThe 932*93f27766SDomagoj Stolfa.Fn printf 933*93f27766SDomagoj Stolfaaction begins with an object containing the formatted output of the 934*93f27766SDomagoj Stolfa.Fn printf 935*93f27766SDomagoj Stolfaaction. 936*93f27766SDomagoj StolfaSubsequent objects contains the value of each of the arguments to 937*93f27766SDomagoj Stolfa.Fn printf 938*93f27766SDomagoj Stolfain its raw form as if the 939*93f27766SDomagoj Stolfa.Fn trace 940*93f27766SDomagoj Stolfaaction was used instead. 941*93f27766SDomagoj StolfaA 942*93f27766SDomagoj Stolfa.Fn printf 943*93f27766SDomagoj Stolfastatement which contains no arguments other than the message will only have 944*93f27766SDomagoj Stolfaone object following the message object and its value will always be 0. 945*93f27766SDomagoj StolfaThis is an artefact of the implementation and can safely be ignored. 946*93f27766SDomagoj Stolfa.Bd -literal 947*93f27766SDomagoj Stolfa# dtrace --libxo json,pretty -n 'BEGIN { printf("... %Y, ..", walltimestamp); }' 948*93f27766SDomagoj Stolfa 949*93f27766SDomagoj Stolfa{ 950*93f27766SDomagoj Stolfa "message": "... 2023 Sep 7 16:49:02, .." 951*93f27766SDomagoj Stolfa}, 952*93f27766SDomagoj Stolfa{ 953*93f27766SDomagoj Stolfa "value": 1694105342633402400 954*93f27766SDomagoj Stolfa}, 955*93f27766SDomagoj Stolfa{ 956*93f27766SDomagoj Stolfa ... 957*93f27766SDomagoj Stolfa} 958*93f27766SDomagoj Stolfa.Ed 959*93f27766SDomagoj Stolfa.Pp 960*93f27766SDomagoj StolfaScalar aggregations are aggregations which produce a single value for a given 961*93f27766SDomagoj Stolfakey. 962*93f27766SDomagoj StolfaThese aggregations include 963*93f27766SDomagoj Stolfa.Fn count , 964*93f27766SDomagoj Stolfa.Fn min , 965*93f27766SDomagoj Stolfa.Fn max , 966*93f27766SDomagoj Stolfa.Fn stddev 967*93f27766SDomagoj Stolfaand 968*93f27766SDomagoj Stolfa.Fn sum . 969*93f27766SDomagoj StolfaEach one of them is represented by the key containing their name. 970*93f27766SDomagoj StolfaFor example, the output of a 971*93f27766SDomagoj Stolfa.Fn stddev 972*93f27766SDomagoj Stolfaaggregation will contain a key 973*93f27766SDomagoj Stolfa.Dq stddev 974*93f27766SDomagoj Stolfainside an 975*93f27766SDomagoj Stolfa.Dq aggregation-data 976*93f27766SDomagoj Stolfaobject: 977*93f27766SDomagoj Stolfa.Bd -literal 978*93f27766SDomagoj Stolfa{ 979*93f27766SDomagoj Stolfa "aggregation-data": [ 980*93f27766SDomagoj Stolfa { 981*93f27766SDomagoj Stolfa "keys": [ 982*93f27766SDomagoj Stolfa ... 983*93f27766SDomagoj Stolfa ], 984*93f27766SDomagoj Stolfa "stddev": ... 985*93f27766SDomagoj Stolfa } 986*93f27766SDomagoj Stolfa ], 987*93f27766SDomagoj Stolfa "aggregation-name": ... 988*93f27766SDomagoj Stolfa} 989*93f27766SDomagoj Stolfa.Ed 990*93f27766SDomagoj Stolfa.Pp 991*93f27766SDomagoj StolfaThe 992*93f27766SDomagoj Stolfa.Dq keys 993*93f27766SDomagoj Stolfafield remains consistent across all aggregations, however 994*93f27766SDomagoj Stolfa.Fn quantize , 995*93f27766SDomagoj Stolfa.Fn lquantize 996*93f27766SDomagoj Stolfaand 997*93f27766SDomagoj Stolfa.Fn llquantize 998*93f27766SDomagoj Stolfaneed to be treated differently. 999*93f27766SDomagoj Stolfa.Sy oformat 1000*93f27766SDomagoj Stolfawill create a new array of objects called 1001*93f27766SDomagoj Stolfa.Dq buckets . 1002*93f27766SDomagoj StolfaEach of the objects contains a 1003*93f27766SDomagoj Stolfa.Dq value 1004*93f27766SDomagoj Stolfaand a 1005*93f27766SDomagoj Stolfa.Dq count 1006*93f27766SDomagoj Stolfafield which are 1007*93f27766SDomagoj Stolfathe left-hand side and the right-hand side of human-readable 1008*93f27766SDomagoj Stolfa.Nm 1009*93f27766SDomagoj Stolfaoutput respectively. 1010*93f27766SDomagoj StolfaThe full object has the following format: 1011*93f27766SDomagoj Stolfa.Bd -literal 1012*93f27766SDomagoj Stolfa{ 1013*93f27766SDomagoj Stolfa "aggregation-data": [ 1014*93f27766SDomagoj Stolfa ... 1015*93f27766SDomagoj Stolfa { 1016*93f27766SDomagoj Stolfa "keys": [ 1017*93f27766SDomagoj Stolfa ... 1018*93f27766SDomagoj Stolfa ], 1019*93f27766SDomagoj Stolfa "buckets": [ 1020*93f27766SDomagoj Stolfa { 1021*93f27766SDomagoj Stolfa "value": 32, 1022*93f27766SDomagoj Stolfa "count": 0 1023*93f27766SDomagoj Stolfa }, 1024*93f27766SDomagoj Stolfa { 1025*93f27766SDomagoj Stolfa "value": 64, 1026*93f27766SDomagoj Stolfa "count": 17 1027*93f27766SDomagoj Stolfa }, 1028*93f27766SDomagoj Stolfa ... 1029*93f27766SDomagoj Stolfa ], 1030*93f27766SDomagoj Stolfa }, 1031*93f27766SDomagoj Stolfa ... 1032*93f27766SDomagoj Stolfa ] 1033*93f27766SDomagoj Stolfa "aggregation-name": ... 1034*93f27766SDomagoj Stolfa} 1035*93f27766SDomagoj Stolfa.Ed 1036*93f27766SDomagoj Stolfa.Pp 1037*93f27766SDomagoj StolfaSimilar to scalar aggregations, named scalar actions such as 1038*93f27766SDomagoj Stolfa.Fn mod , 1039*93f27766SDomagoj Stolfa.Fn umod , 1040*93f27766SDomagoj Stolfa.Fn usym , 1041*93f27766SDomagoj Stolfa.Fn tracemem 1042*93f27766SDomagoj Stolfaand 1043*93f27766SDomagoj Stolfa.Fn printm 1044*93f27766SDomagoj Stolfawill output an object with the key being equal to the 1045*93f27766SDomagoj Stolfaname of the action. 1046*93f27766SDomagoj StolfaFor example, 1047*93f27766SDomagoj Stolfa.Fn printm 1048*93f27766SDomagoj Stolfaoutput would produce the following object: 1049*93f27766SDomagoj Stolfa.Bd -literal 1050*93f27766SDomagoj Stolfa{ 1051*93f27766SDomagoj Stolfa "printm": "0x4054171100" 1052*93f27766SDomagoj Stolfa} 1053*93f27766SDomagoj Stolfa.Ed 1054*93f27766SDomagoj Stolfa.Pp 1055*93f27766SDomagoj Stolfa.Fn sym 1056*93f27766SDomagoj Stolfais slightly different. 1057*93f27766SDomagoj StolfaWhile it will create a 1058*93f27766SDomagoj Stolfa.Dq sym 1059*93f27766SDomagoj Stolfafield which contains its value, in some cases it will also create additional 1060*93f27766SDomagoj Stolfafields 1061*93f27766SDomagoj Stolfa.Dq object , 1062*93f27766SDomagoj Stolfa.Dq name 1063*93f27766SDomagoj Stolfaand 1064*93f27766SDomagoj Stolfa.Dq offset : 1065*93f27766SDomagoj Stolfa.Bd -literal 1066*93f27766SDomagoj Stolfa# dtrace -x oformat=json,pretty -On 'BEGIN { sym((uintptr_t)&`prison0); }' 1067*93f27766SDomagoj Stolfa 1068*93f27766SDomagoj Stolfa{ 1069*93f27766SDomagoj Stolfa "sym": "kernel`prison0", 1070*93f27766SDomagoj Stolfa "object": "kernel", 1071*93f27766SDomagoj Stolfa "name": "prison0" 1072*93f27766SDomagoj Stolfa} 1073*93f27766SDomagoj Stolfa 1074*93f27766SDomagoj Stolfa# dtrace --libxo json,pretty -On 'BEGIN { sym((uintptr_t)curthread); }' 1075*93f27766SDomagoj Stolfa 1076*93f27766SDomagoj Stolfa{ 1077*93f27766SDomagoj Stolfa "sym": "0xfffffe00c18d2000", 1078*93f27766SDomagoj Stolfa "offset": "0xfffffe00c18d2000" 1079*93f27766SDomagoj Stolfa} 1080*93f27766SDomagoj Stolfa.Ed 1081*93f27766SDomagoj Stolfa.Pp 1082*93f27766SDomagoj Stolfa.Fn stack 1083*93f27766SDomagoj Stolfaand 1084*93f27766SDomagoj Stolfa.Fn ustack 1085*93f27766SDomagoj Stolfaactions unroll each of the stack frames into its own object in an array. 1086*93f27766SDomagoj StolfaThe only real difference between them is that the 1087*93f27766SDomagoj Stolfa.Fn stack 1088*93f27766SDomagoj Stolfaaction will produce a list called 1089*93f27766SDomagoj Stolfa.Dq stack-frames 1090*93f27766SDomagoj Stolfawhile 1091*93f27766SDomagoj Stolfa.Fn ustack 1092*93f27766SDomagoj Stolfawill produce one called 1093*93f27766SDomagoj Stolfa.Dq ustack-frames . 1094*93f27766SDomagoj StolfaThe following is an example of their 1095*93f27766SDomagoj Stolfa.Sy oformat 1096*93f27766SDomagoj Stolfaoutput: 1097*93f27766SDomagoj Stolfa.Bd -literal 1098*93f27766SDomagoj Stolfa{ 1099*93f27766SDomagoj Stolfa "stack-frames": [ 1100*93f27766SDomagoj Stolfa { 1101*93f27766SDomagoj Stolfa "symbol": "dtrace.ko`dtrace_dof_create+0x35", 1102*93f27766SDomagoj Stolfa "module": "dtrace.ko", 1103*93f27766SDomagoj Stolfa "name": "dtrace_dof_create", 1104*93f27766SDomagoj Stolfa "offset": "0x35" 1105*93f27766SDomagoj Stolfa }, 1106*93f27766SDomagoj Stolfa { 1107*93f27766SDomagoj Stolfa "symbol": "dtrace.ko`dtrace_ioctl+0x81c", 1108*93f27766SDomagoj Stolfa "module": "dtrace.ko", 1109*93f27766SDomagoj Stolfa "name": "dtrace_ioctl", 1110*93f27766SDomagoj Stolfa "offset": "0x81c" 1111*93f27766SDomagoj Stolfa }, 1112*93f27766SDomagoj Stolfa ... 1113*93f27766SDomagoj Stolfa ] 1114*93f27766SDomagoj Stolfa} 1115*93f27766SDomagoj Stolfa 1116*93f27766SDomagoj Stolfa{ 1117*93f27766SDomagoj Stolfa "ustack-frames": [ 1118*93f27766SDomagoj Stolfa { 1119*93f27766SDomagoj Stolfa "symbol": "libc.so.7`ioctl+0xa", 1120*93f27766SDomagoj Stolfa "module": "libc.so.7", 1121*93f27766SDomagoj Stolfa "name": "ioctl", 1122*93f27766SDomagoj Stolfa "offset": "0xa" 1123*93f27766SDomagoj Stolfa }, 1124*93f27766SDomagoj Stolfa { 1125*93f27766SDomagoj Stolfa "symbol": "libdtrace.so.2`dtrace_go+0xf3", 1126*93f27766SDomagoj Stolfa "module": "libdtrace.so.2", 1127*93f27766SDomagoj Stolfa "name": "dtrace_go", 1128*93f27766SDomagoj Stolfa "offset": "0xf3" 1129*93f27766SDomagoj Stolfa }, 1130*93f27766SDomagoj Stolfa ... 1131*93f27766SDomagoj Stolfa ] 1132*93f27766SDomagoj Stolfa} 1133*93f27766SDomagoj Stolfa.Ed 1134*93f27766SDomagoj Stolfa.Pp 1135*93f27766SDomagoj StolfaThe 1136*93f27766SDomagoj Stolfa.Fn print 1137*93f27766SDomagoj Stolfaaction produces a 1138*93f27766SDomagoj Stolfa.Dq type 1139*93f27766SDomagoj Stolfalist in the following form: 1140*93f27766SDomagoj Stolfa.Bd -literal 1141*93f27766SDomagoj Stolfa{ 1142*93f27766SDomagoj Stolfa "type": [ 1143*93f27766SDomagoj Stolfa { 1144*93f27766SDomagoj Stolfa "object-name": "kernel", 1145*93f27766SDomagoj Stolfa "name": "struct thread", 1146*93f27766SDomagoj Stolfa "ctfid": 2372 1147*93f27766SDomagoj Stolfa }, 1148*93f27766SDomagoj Stolfa { 1149*93f27766SDomagoj Stolfa "member-name": "td_lock", 1150*93f27766SDomagoj Stolfa "name": "struct mtx *volatile", 1151*93f27766SDomagoj Stolfa "ctfid": 2035, 1152*93f27766SDomagoj Stolfa "value": "0xffffffff82158440" 1153*93f27766SDomagoj Stolfa }, 1154*93f27766SDomagoj Stolfa ... 1155*93f27766SDomagoj Stolfa} 1156*93f27766SDomagoj Stolfa.Ed 1157*93f27766SDomagoj Stolfa.Pp 1158*93f27766SDomagoj StolfaIf the type is invalid, a 1159*93f27766SDomagoj Stolfa.Dq warning 1160*93f27766SDomagoj Stolfaobject will be produced containing the diagnostic message as well as two 1161*93f27766SDomagoj Stolfapossible optional fields: 1162*93f27766SDomagoj Stolfa.Dq type-identifier 1163*93f27766SDomagoj Stolfawhich contains the CTF identifier of the type and 1164*93f27766SDomagoj Stolfa.Dq size containing the size of an integer, enum or float. 1165*93f27766SDomagoj StolfaThe fields generated will depend on the kind of error that was encountered 1166*93f27766SDomagoj Stolfawhile processing the trace data. 1167*93f27766SDomagoj Stolfa.Pp 1168*93f27766SDomagoj StolfaFinally, 1169*93f27766SDomagoj Stolfa.Sy oformat 1170*93f27766SDomagoj Stolfaprovides a special pseudo-probe to represent drops. 1171*93f27766SDomagoj StolfaAs 1172*93f27766SDomagoj Stolfa.Nm 1173*93f27766SDomagoj Stolfapolls for various kinds of drops 1174*93f27766SDomagoj Stolfa.Sy oformat 1175*93f27766SDomagoj Stolfawill produce output similar to the following in order to represent drops: 1176*93f27766SDomagoj Stolfa.Bd -literal 1177*93f27766SDomagoj Stolfa{ 1178*93f27766SDomagoj Stolfa "cpu": -1, 1179*93f27766SDomagoj Stolfa "id": -1, 1180*93f27766SDomagoj Stolfa "provider": "dtrace", 1181*93f27766SDomagoj Stolfa "module": "INTERNAL", 1182*93f27766SDomagoj Stolfa "function": "INTERNAL", 1183*93f27766SDomagoj Stolfa "name": "DROP", 1184*93f27766SDomagoj Stolfa "timestamp": ..., 1185*93f27766SDomagoj Stolfa "count": ..., 1186*93f27766SDomagoj Stolfa "total": ..., 1187*93f27766SDomagoj Stolfa "kind": 2, 1188*93f27766SDomagoj Stolfa "msg": "... dynamic variable drops\n" 1189*93f27766SDomagoj Stolfa} 1190*93f27766SDomagoj Stolfa.Ed 11913f3c4e0bSMark Johnston.Sh OPERANDS 11923f3c4e0bSMark JohnstonYou can specify zero or more additional arguments on the 11933f3c4e0bSMark Johnston.Nm 11943f3c4e0bSMark Johnstoncommand line to define a set of macro variables and so forth). 11953f3c4e0bSMark JohnstonThe additional arguments can be used in D programs specified using the 11963f3c4e0bSMark Johnston.Fl s 11973f3c4e0bSMark Johnstonoption or on the command line. 11983f3c4e0bSMark Johnston.Sh FILES 11993f3c4e0bSMark Johnston.Bl -tag -width /boot/dtrace.dof -compact 12003f3c4e0bSMark Johnston.It Pa /boot/dtrace.dof 12013f3c4e0bSMark JohnstonFile for anonymous tracing directives. 12023f3c4e0bSMark Johnston.El 12033f3c4e0bSMark Johnston.Sh EXIT STATUS 12043f3c4e0bSMark JohnstonThe following exit statuses are returned: 12053f3c4e0bSMark Johnston.Bl -tag -width indent 12063f3c4e0bSMark Johnston.It 0 12072be1a816SJohn BirrellSuccessful completion. 12083f3c4e0bSMark Johnston.Pp 12093f3c4e0bSMark JohnstonFor D program requests, an exit status of 0 indicates that programs were 12103f3c4e0bSMark Johnstonsuccessfully compiled, probes were successfully enabled, or anonymous state 12113f3c4e0bSMark Johnstonwas successfully retrieved. 12123f3c4e0bSMark Johnston.Nm 12133f3c4e0bSMark Johnstonreturns 0 even if the specified tracing requests encountered errors or drops. 12143f3c4e0bSMark Johnston.It 1 12152be1a816SJohn BirrellAn error occurred. 12163f3c4e0bSMark Johnston.Pp 12173f3c4e0bSMark JohnstonFor D program requests, an exit status of 1 indicates that program compilation 12183f3c4e0bSMark Johnstonfailed or that the specified request could not be satisfied. 12193f3c4e0bSMark Johnston.It 2 12202be1a816SJohn BirrellInvalid command line options or arguments were specified. 12213f3c4e0bSMark Johnston.El 12223f3c4e0bSMark Johnston.Sh SEE ALSO 12233f3c4e0bSMark Johnston.Xr cpp 1 , 1224b9d64941SMark Johnston.Xr elf 5 , 1225b9d64941SMark Johnston.Xr SDT 9 12263f3c4e0bSMark Johnston.Rs 12273f3c4e0bSMark Johnston.%T Solaris Dynamic Tracing Guide 12283f3c4e0bSMark Johnston.Re 1229ed35c7cfSChristos Margiolis.Sh HISTORY 1230ed35c7cfSChristos MargiolisThe 1231ed35c7cfSChristos Margiolis.Nm 1232ed35c7cfSChristos Margiolisutility first appeared in 1233ed35c7cfSChristos Margiolis.Fx 7.1 . 1234