Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dtrace_add_anon (3DTRACE)

Name

dtrace_start_anon, dtrace_add_anon, dtrace_finish_anon - DTrace anonymous tracing support

Synopsis

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

     int dtrace_start_anon(dtrace_hdl_t *dtp)

     int dtrace_add_anon(dtrace_hdl_t *dtp, dtrace_prog_t *dpp)

     int dtrace_finish_anon(dtrace_hdl_t *dtp)

Description

The dtrace_start_anon() function begins the creation of an anonymous enabling.

The dtrace_add_anon() function adds the specified program, dpp to the anonymous enabling.

The dtrace_finish_anon() function finishes the creation of the anonymous enabling.

Return Values

On successful completion, these functions return 0. Otherwise these functions return -1 and set the DTrace error number to indicate the reason for the failure. See the dtrace_errno(3DTRACE) man page for more information.

Errors

The dtrace_start_anon(), dtrace_add_anon(), and dtrace_finish_anon() function will fail if:

EINVAL

The dtp argument is NULL.

The dtrace_start_anon() function will fail if:

EDT_ANON

The function is unable to open the DTrace driver configuration file.

The dtrace_add_anon() function will fail if:

EINVAL

The dpp argument is NULL.

EDT_NOMEM

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

The dtrace_finish_anon() function will fail if:

EDT_ANON

The function is unable to open the DTrace-specific /etc/system.d file.

EDT_NOMEM

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

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)