|
NAME
DESCRIPTIONThe dtrace:::BEGINThe Variables such as stack or
execname cannot be relied upon in the execution
context of the
dtrace:::ENDThe dtrace:::ERRORThe The following table describes the arguments to
The fault types are:
FILES
EXAMPLESExample 1: Custom Column HeadersThe following script uses the
#pragma D option quiet
dtrace:::BEGIN
{
printf(" %12s %-20s %-20s %s\n",
"DELTA(us)", "OLD", "NEW", "TIMESTAMP");
}
Example 2: Handling Runtime Errors with dtrace:::ERRORThe following script causes a runtime error by dereferencing a
pointer on address 19930908 in the
ERROR
{
printf("Oops\n");
printf("EPID (arg1): %d\n", arg1);
printf("Action index (arg2): %d\n", arg2);
printf("DIF offset (arg3): %d\n", arg3);
printf("Fault type (arg4): %d\n", arg4);
printf("Accessed address (arg5): %X\n", arg5);
exit(1);
}
BEGIN
{
*(int *)0x19931101;
}
END {
printf("Bye");
}
This script will result in the following output: CPU ID FUNCTION:NAME 2 3 :ERROR Oops EPID (arg1): 2 Action index (arg2): 1 DIF offset (arg3): 16 Fault type: 1 arg5: 19931101 dtrace: error on enabled probe ID 2 (ID 1: dtrace:::BEGIN): invalid address (0x19931101) in action #1 at DIF offset 16 2 2 :END Bye SEE ALSOThe illumos Dynamic Tracing Guide, https://illumos.org/books/dtrace/chp-dtrace.html, 2008, Chapter dtrace Provider. AUTHORSThis manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>. CAVEATSThe dtrace(1) will not fire the
|