DTrace Variables

By Ifeyinwa Okoye and John Stearns, August 2006  
DTrace Variables
Used to represent fixed-size data objects. They could be individual such as pointers and integers or composite such as arrays.
x=123 (scalar variable x of type integer)
Associative array
Used to represent collections of data elements that can be retrieved by specifying a key. There is no predefined limit of the number of elements. Elements can be indexed by any tuple, and elements are not stored in preallocated consecutive storage locations.
a[123,“hello”] = 56 (associative array a with key, [int, string])
Used to declare variable storage that is local to each operating system thread.
self->x= 45 (thread-local variable x of type integer)
This variable is active for the lifetime of a given probe clause and its storage is reused for each D program clause.
this->c='D' (character clause-local variable c)
All these variables are scalar global variables.
The backquote character ( `) is a scoping operator for accessing variables that are defined in the OS and not in your D program.
`kmem_flags (accessing a C variable in the kernel source code)
Left Curve
System Administrator
Right Curve
Left Curve
Developer and ISVs
Right Curve
Left Curve
Related Products
Right Curve