freebsd-skq/sys/cddl
markj fa6de9117d The fasttrap fork handler is responsible for removing tracepoints in the
child process that were inherited from its parent. However, this should
not be done in the case of a vfork, since the fork handler ends up removing
the tracepoints from the shared vm space, and userland DTrace probes in the
parent will no longer fire as a result.

Now the child of a vfork may trigger userland DTrace probes enabled in its
parent, so modify the fasttrap probe handler to handle this case and handle
the child process in the same way that it would handle the traced process.
In particular, if once traces function foo() in a process that vforks, and
the child calls foo(), fasttrap will treat this call as having come from the
parent. This is the behaviour of the upstream code.

While here, add #ifdef guards to some code that isn't present upstream.

MFC after:	1 month
2013-12-18 01:41:52 +00:00
..
boot/zfs MFV r245512: 2013-02-09 06:39:28 +00:00
compat/opensolaris zfs: add zfs_freebsd_putpages 2013-11-29 15:39:39 +00:00
contrib/opensolaris The fasttrap fork handler is responsible for removing tracepoints in the 2013-12-18 01:41:52 +00:00
dev dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00