Utility APIs
-
int dtrace_addr2str(dtrace_hdl_t *dtp, uint64_t addr, char *str, int nbytes)
-
Takes a kernel address
addr
and writes the name of the symbol associated with that address into the provided bufferstr
. Seedtrace_addr2str
(3DTRACE). -
int dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid, uint64_t addr, char *str, int nbytes)
-
Takes a user space address
addr
and writes its string representation into the provided bufferstr
. The exact behaviour is determined by theuresolve
option. Seedtrace_uaddr2str
(3DTRACE). -
int dtrace_xstr2desc(dtrace_hdl_t *dtp, dtrace_probespec_t spec, const char *s, int argc, char *const argv[], dtrace_probedesc_t *pdp)
-
Takes a string,
s
, containing the name of a DTrace probe that might contain macros, and populates thedtrace_probedesc_t
referenced bypdp
with the appropriate data. Seedtrace_xstr2desc
(3DTRACE). -
int dtrace_str2desc(dtrace_hdl_t *dtp, dtrace_probespec_t spec, const char *s, dtrace_probedesc_t *pdp)
-
Takes a string,
s
, containing the name of a DTrace probe that does not contain macros and populates thedtrace_probedesc_t
referenced bypdp
with the appropriate data. Seedtrace_str2desc
(3DTRACE). -
int dtrace_id2desc(dtrace_hdl_t *dtp, dtrace_id_t id, dtrace_probedesc_t *pdp)
-
Takes a DTrace probe ID,
id
, and populates the fields of thedtrace_probedesc_t
referenced bypdp
with the data corresponding to that probe. Seedtrace_id2desc
(3DTRACE). -
char * dtrace_desc2str(const dtrace_probedesc_t *pdp, char *buf, size_t len)
-
Takes a
dtrace_probedesc_t
() referenced bypdp
and returns the description of the probe in the provided buffer,buf
. Seedtrace_desc2str
(3DTRACE). -
char * dtrace_attr2str(dtrace_attribute_t attr, char *buf, size_t len)
-
Takes a DTrace interface attribute
dtrace_attribute_t
,attr
and returns the string describing that attribute in the provided buffer,buf
. Seedtrace_attr2str
(3DTRACE). -
int dtrace_str2attr(const char *str, dtrace_attribute_t *attr)
-
Takes a string,
str
, containing an attribute description and populates thedtrace_attribute_t
referenced byattr
with the appropriate data. Seedtrace_str2attr
(3DTRACE). -
const char * dtrace_stability_name(dtrace_stability_t s)
-
Takes a DTrace stability value,
s
, and returns the string corresponding to that stability value. Seedtrace_stability_name
(3DTRACE). -
const char * dtrace_class_name(dtrace_class_t c)
-
Takes a value representing a DTrace dependency class and returns the string corresponding to that value. See
dtrace_class_name
(3DTRACE). -
int dtrace_provider_modules(dtrace_hdl_t *dtp, const char **mods, int nmods)
-
Retrieves the list of kernel modules functioning as DTrace providers. The function writes at most
nmods
module names into the arraymods
. Seedtrace_provider_modules
(3DTRACE).