OpenBSD manual page server

Manual Page Search Parameters

DT(4) Device Drivers Manual DT(4)

dtdynamic tracer

pseudo-device dt

System and application tracing can happen in the kernel. It has to be configured and enabled through the ioctl(2) interface exposed by the pseudo-device /dev/dt.

This device can only be opened when the kern.allowdt sysctl(2) variable is set.

The ioctl(2) command codes below are defined in <dev/dt/dtvar.h>.

struct dtioc_probe *dtpr
Get available probe entries.
struct dtioc_probe {
	size_t		 	 dtpr_size;
	struct dtioc_probe_info	*dtpr_probes;
};

If dtpr_size is non-zero, as many probes as possible that can fit into this size will be copied into the supplied buffer. On exit, dtpr_size is always set to the total size required to hold all probe entries (i.e., it is set to sizeof(struct dtioc_probe_info) * dt_nprobes).

struct dtioc_stat *dtst
Get statistics for current recording.
struct dtioc_stat {
	uint64_t		 dtst_readevt;
	uint64_t		 dtst_dropevt;
};
int on
Start or stop recording.
struct dtioc_req *dtrq
Enable the given probe for recording.
struct dtioc_req {
	uint32_t		 dtrq_pbn;
	struct dt_filter	 dtrq_filter;
	uint32_t		 dtrq_rate;
	uint64_t		 dtrq_evtflags;
};

/dev/dt
dynamic tracing device.

An open of /dev/dt will fail if:

[]
the kern.allowdt sysctl(2) variable wasn't set.
[]
not enough memory space was available.

ioctl(2), bt(5), btrace(8)

The dt dynamic tracing mechanism first appeared in OpenBSD 6.7.

December 2, 2020 OpenBSD-7.2