Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Thursday, June 13, 2019
 
 

dtrace_dof_destroy (3DTRACE)

Name

dtrace_dof_create, dtrace_dof_destroy - DTrace Object Format interface

Synopsis

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

     void *dtrace_dof_create(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
	uint_t flags)

     void dtrace_dof_destroy(dtrace_hdl_t *dtp, void *dof)

Description

The dtrace_dof_create() function creates a DTrace Object Format (DOF) object, given a compile D program represented by the pgp argument. The dtp argument is the DTrace handle returned by the dtrace_open(3DTRACE) function. The flags argument specifies options for the DOF output.

The dtrace_dof_destroy() function deallocates an existing DOF object.

Return Values

On successful completion, the dtrace_dof_create() function returns a pointer to a valid DOF object. On failure, the function returns NULL and sets the DTrace error number to indicate the reason for the failure. See the dtrace_errno(3DTRACE) man page for more information.

The dtrace_close() function does not return any value, although it sets the DTrace error number to indicate the reason for failure. See the dtrace_errno(3DTRACE) man page for more information.

Errors

The dtrace_dof_create() function will fail if:

EINVAL

dtp or pgp is NULL, or an invalid bit is set in flags.

EDT_NOMEM

The system was unable to allocate memory during the processing of this function.

The dtrace_dof_destroy() function will fail if:

EINVAL

dtp is NULL.

Usage

The possible values for the flags argument to the dtrace_dof_create() function are listed below:

DTRACE_D_STRIP

Strip non-loadable sections from the object.

DTRACE_D_PROBES

Include provider and probe definitions, for user-defined providers.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Architecture
all
Availability
system/dtrace
Interface Stability
Committed
MT-Level
Safe

See Also

libdtrace(3LIB), dtrace_errno(3DTRACE)