D provides a number of functions you can use in your action scripts. Here is a sampling.
Standard C-style printf function
Displays its argument, using a default format based on the type. Also appends a newline for you.
Print aggregate values, described in more detail below.
Print the user level stack trace. If the process exits or is killed before the DTrace experiment has completed, DTrace might not be able to resolve the program counter, so you will get hex values rather than symbolic values.
Terminate execution early. Otherwise, you have to type Control-C to quit.
DTrace scripts execute in kernel scope. Consider probing a system call like write(), which takes a pointer to a buffer with ...