User Tools

Site Tools


solaris:dtrace_fire_extern.3dtrace

dtrace_fire_extern


NAME

dtrace_fire_extern - Fire DTrace EXTERN probe

SYNOPSIS

cc [ flag… ] file… -ldtrace [ library… ]
#include <dtrace.h>

int dtrace_fire_extern(dtrace_hdl_t *dtp, uint64_t arg1,

uint64_t arg2, uint64_t arg3)

DESCRIPTION

The dtrace_fire_extern() function fires the Dtrace:::EXTERN probe in the running D program associated with the dtp argument. The arguments arg1, arg2, and arg3 to the function are passed as arguments arg1, arg2, and arg3, to the dtrace:::EXTERN probe.

RETURN VALUES

On successful completion, the dtrace_fire_extern() function returns 0. On failure, the function returns -1, and sets the DTrace error number to indicate the reason for the failure. See the dtrace_errno(3DTRACE) man page for more information.

ERRORS

The dtrace_fire_extern() function will fail if:

EINVAL

dtp is NULL.

EFAULT

The system encountered an error when copying the arguments into the kernel.

EXAMPLES

Example 1 Using the dtrace_fire_extern() Function

Given the following script,

EXTERN

{
printf(“%d %d %d\n”, arg1, arg2, arg3);
exit(0);
}

the following line in a simple DTrace consumer

dtrace_fire_extern(dtp, 1 2 3);

causes the script to generate the following output:

1 2 3

See the libdtrace(3LIB) man page for an example of a simple DTrace consumer.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

SEE ALSO

libdtrace(3LIB), dtrace_errno(3DTRACE)


solaris/dtrace_fire_extern.3dtrace.txt · Last modified: 2023/07/19 08:57 by A User Not Logged in