stack() Function

The stack() action stores a sequence of kernel addresses that represents the kernel stack. These addresses are stored as an array of 64-bit or 32-bit values.

dtrd_action == DTRACEACT_STACK

The length of this array is stored in the dtrd_arg member of the dtrace_recdesc_t structure. The length of the array represents the depth of the stack. To calculate the size of the individual stored address, divide the value of dtrd_size by the value of dtrd_arg.

The first element of this array is the program counter (PC) in the function that executes when the DTrace probe is fired. Similarly, the next element is the PC of the calling function.

Note:

Some of the PCs might be NULL. When a NULL PC is encountered, the bottom of the stack has been reached.

Data Format for the stack() Action


Graphic shows data format for the stack action