dtrace_probe_info, dtrace_probe_iter - DTrace probe interface
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)
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.
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.
The dtrace_probe_info() function will fail if:
The dtp, pdp, or pip argument is NULL.
The probe description, pdp matches no probes.
The probe description, pdpmatches an unstable set of probes.
The dtrace_probe_iter() function will fail if:
The dtp or func argument is NULL.
The probe description, pdp matches no probes.
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;
See attributes(7) for descriptions of the following attributes:
|