Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dtrace_probe_iter (3DTRACE)

Name

dtrace_probe_info, dtrace_probe_iter - DTrace probe interface

Synopsis

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

     typedef int dtrace_probe_f(dtrace_hdl_t *, const dtrace_probedesc_t *,
	void *);

     int dtrace_probe_iter(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp,
	dtrace_probe_f *func, void *arg)

     int dtrace_probe_info(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp,
	dtrace_probeinfo_t *pip)

Description

The dtrace_probe_iter() function iterates over the set of probes specified in the pdp argument, calling the function, func for each one.

The dtrace_probe_info() function returns information about the probe specified in the pdp argument. The information is returned in the pip argument.

Return Values

On successful completion, these functions return 0. If the func argument returns a non-zero value for some probe, the dtrace_probe_iter() function returns that value. 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_probe_info() function will fail if:

EINVAL

The dtp, pdp, or pip argument is NULL.

EDT_NOPROBE

The probe description, pdp matches no probes.

EDT_UNSTABLE

The probe description, pdpmatches an unstable set of probes.


Note -  If the probe description, pdp, matches more than probe, then either the arguments data stability of the provider is less than Evolving, or any pdp component that is at least Evolving is empty or is specified using a globbing expression.

The dtrace_probe_iter() function will fail if:

EINVAL

The dtp or func argument is NULL.

EDT_NOPROBE

The probe description, pdp matches no probes.

Usage

The dtrace_probedesc_t data structure is defined as follows:

     typedef struct dtrace_probedesc {
             dtrace_id_t dtpd_id;                    /* probe identifier */
             char dtpd_provider[DTRACE_PROVNAMELEN]; /* probe provider name */
             char dtpd_mod[DTRACE_MODNAMELEN];       /* probe module name */
             char dtpd_func[DTRACE_FUNCNAMELEN];     /* probe function name */
             char dtpd_name[DTRACE_NAMELEN];         /* probe name */
     } dtrace_probedesc_t;

The dtrace_probeinfo_t data structure is defined as follows:

     typedef struct dtrace_probeinfo {
             dtrace_attribute_t dtp_attr;            /* name attributes */
             dtrace_attribute_t dtp_arga;            /* arg attributes */
             const dtrace_typeinfo_t *dtp_argv;      /* arg types */
             int dtp_argc;                           /* arg count */
     } dtrace_probeinfo_t;

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)