freebsd-dev/cddl/contrib
Mark Johnston b529028676 Implement support for boot-time DTrace.
This allows one to enable DTrace probes relatively early during boot,
during SI_SUB_DTRACE_ANON, before dtrace(1) can invoked. The desired
enabling is created using dtrace -A, which writes a /boot/dtrace.dof
file and uses nextboot(8) to ensure that DTrace kernel modules are loaded
and that the DOF file describing the enabling is loaded by loader(8)
during the subsequent boot. The trace output can then be fetched with
dtrace -a.

With this commit, boot-time DTrace is only functional on i386 and amd64: on
other architectures, the high-resolution timer frequency is initialized
during SI_SUB_CLOCKS and is thus not available when the anonymous
tracing state is initialized. On x86, the TSC is used and is thus available
earlier.

MFC after:	1 month
Relnotes:	yes
2016-04-10 01:25:48 +00:00
..
dtracetoolkit Summary: Remove the need for `mpid which is Illumos/Solaris specific. 2015-03-08 21:51:37 +00:00
opensolaris Implement support for boot-time DTrace. 2016-04-10 01:25:48 +00:00