Go to main content

Oracle® Solaris 11.4 DTrace (Dynamic Tracing) Guide

Exit Print View

Updated: September 2020
 
 

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 buffer str. See dtrace_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 buffer str. The exact behaviour is determined by the uresolve option. See dtrace_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 the dtrace_probedesc_t referenced by pdp with the appropriate data. See dtrace_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 the dtrace_probedesc_t referenced by pdp with the appropriate data. See dtrace_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 the dtrace_probedesc_t referenced by pdp with the data corresponding to that probe. See dtrace_id2desc(3DTRACE).

char * dtrace_desc2str(const dtrace_probedesc_t *pdp, char *buf, size_t len)

Takes a dtrace_probedesc_t() referenced by pdp and returns the description of the probe in the provided buffer, buf. See dtrace_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. See dtrace_attr2str(3DTRACE).

int dtrace_str2attr(const char *str, dtrace_attribute_t *attr)

Takes a string, str, containing an attribute description and populates the dtrace_attribute_t referenced by attr with the appropriate data. See dtrace_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. See dtrace_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 array mods. See dtrace_provider_modules(3DTRACE).