Page MenuHomeFreeBSD

D16688.diff
No OneTemporary

D16688.diff

Index: cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
===================================================================
--- cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
+++ cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
@@ -643,6 +643,97 @@
The additional arguments can be used in D programs specified using the
.Fl s
option or on the command line.
+.Sh SCRIPTING
+.Ss Variables
+The following table provides a list of D built-in variables.
+All of these variables are scalar global variables; no thread-local or
+clause-local variables or built-in associative arrays are currently defined by
+D.
+.Bl -tag -width indent
+.It Vt int64_t arg0, ..., arg9
+The first ten input arguments to a probe represented as raw 64-bit integers.
+If fewer than ten arguments are passed to the current probe, the remaining
+variables return zero.
+.It Va args[]
+The typed arguments to the current probe, if any.
+The args[] array is accessed
+using an integer index, but each element is defined to be the type corresponding
+to the given probe argument.
+For example, if args[] is referenced by a
+.Xr read 2
+system call probe, args[0] is of type int, args[1] is of type void *, and
+args[2] is of type
+.Vt size_t .
+.It Vt uintptr_t Va caller
+The program counter location of the current thread just before entering the
+current probe.
+.It Va curthread
+The address of the operating system kernel's internal data structure for the
+current thread.
+.It Vt int Va cpu
+The CPU identifier for the current CPU.
+See
+.Xr dtrace_sched 4
+Provider for more information.
+.It Vt string Va cwd
+The name of the current working directory of the process associated with the
+current thread.
+.It Vt uint_t Va epid
+The enabled probe ID (EPID) for the current probe.
+Uniquely identifies a particular probe that is enabled with a
+specific predicate and set of actions.
+.It Vt int Va errno
+The error value returned by the last system call executed by this thread.
+.It Vt string Va execargs
+The name that was passed to
+.Xr execve 2
+to execute the current process including the arguments that have been passed to
+the program.
+.It Vt string Va execname
+The name that was passed to
+.Xr execve 2
+to execute the current process.
+.It Vt gid_t Va gid
+The group ID of the current process.
+.It Vt uint_t Va id
+The probe ID for the current probe.
+This ID is the system-wide unique identifier for the probe as published by
+DTrace and listed in the output of
+.Nm
+.Fl l .
+.It Vt string Va jailname
+The jail name of the current process.
+.It Vt int Va jid
+The jail ID of the current process.
+.It Vt pid_t Va pid
+The process ID of the current process.
+.It Vt pid_t Va ppid
+The parent process ID of the current process.
+.It Vt string Va probefunc
+The function name portion of the current probe's description.
+.It Vt string Va probemod
+The module name portion of the current probe's description.
+.It Vt string Va probename
+The name portion of the current probe's description.
+.It Vt string Va probeprov
+The provider name portion of the current probe's description.
+.It Vt uint32_t Va stackdepth
+The current thread's stack frame depth at probe firing time.
+.It Vt uint64_t Va timestamp
+The current value of a nanosecond timestamp counter.
+This counter increments from an arbitrary point in the past and should only be
+used for relative computations.
+.It Vt uint64_t Va vtimestamp
+The current value of a nanosecond timestamp counter that is virtualized to the
+amount of time that the current thread has been running on a CPU, minus the time
+spent in DTrace predicates and actions.
+This counter increments from an
+arbitrary point in the past and should only be used for relative time
+computations.
+.It Vt int64_t Va walltimestamp
+The current number of nanoseconds since 00:00 Universal Coordinated Time,
+January 1, 1970.
+.El
.Sh FILES
.Bl -tag -width /boot/dtrace.dof -compact
.It Pa /boot/dtrace.dof
@@ -674,4 +765,5 @@
.Xr SDT 9
.Rs
.%T Solaris Dynamic Tracing Guide
+.%T http://dtrace.org/guide
.Re

File Metadata

Mime Type
text/plain
Expires
Thu, Jun 25, 5:09 AM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34305621
Default Alt Text
D16688.diff (3 KB)

Event Timeline