Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Thursday, June 13, 2019
 
 

dtrace_stmt_iter (3DTRACE)

Name

dtrace_stmt_iter - Iterate over the statements in a D program

Synopsis

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

     typedef int dtrace_stmt_f(dtrace_hdl_t *, dtrace_prog_t *,
	dtrace_stmtdesc_t *, void *);

     int dtrace_stmt_iter(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
	dtrace_stmt_f *func, void *data)

Description

The dtrace_stmt_iter() function iterates over the statements associated with the pgp argument, calling the function, func on each.

Return Values

Upon successful completion, the dtrace_stmt_iter() function returns 0. Otherwise the functions 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_stmt_iter() function will fail if:

EINVAL

The dtp, pgp, or func argument is NULL.

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), dtrace_program_strcompile(3DTRACE), dtrace_program_fcompile(3DTRACE)