1.5.3 Solution to Exercise and Example: Using the END Probe

The following is an example of a simple D program that demonstrates the use of the END probe:

/* goodbye.d -- Simple D program that demonstrates the END probe */

END
{
  trace("goodbye, world");
}
# dtrace -s goodbye.d
dtrace: script 'goodbye.d' matched 1 probe
^C
CPU     ID                    FUNCTION:NAME
  3      2                             :END   goodbye, world
# dtrace -q -s ./goodbye.d
^C
goodbye, world