diff options
author | markj <markj@FreeBSD.org> | 2014-03-18 00:29:33 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-03-18 00:29:33 +0000 |
commit | 437134881a4bc49d0dadada0235ad48146cd62b6 (patch) | |
tree | 56dde2981e33f65ff0e9647708ba151c41df589e /sys/kern/kern_sdt.c | |
parent | f674f353eee112692d83f39cb1f07f1cbb25380a (diff) | |
download | FreeBSD-src-437134881a4bc49d0dadada0235ad48146cd62b6.zip FreeBSD-src-437134881a4bc49d0dadada0235ad48146cd62b6.tar.gz |
MFC r259535:
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.
Diffstat (limited to 'sys/kern/kern_sdt.c')
0 files changed, 0 insertions, 0 deletions