aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2011-02-25 22:05:33 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2011-02-25 22:05:33 +0000
commit7705d4b24a262d1a0fb4017808b65e3b11bfa869 (patch)
tree3fe4071a35332ed1a5991ff27dfba09d647122bb /sys/kern/kern_fork.c
parentb4c20e5e37b3382676f2f71d1962a10987adfa28 (diff)
downloadsrc-7705d4b24a262d1a0fb4017808b65e3b11bfa869.tar.gz
src-7705d4b24a262d1a0fb4017808b65e3b11bfa869.zip
Introduce preliminary support of the show description of the ABI of
traced process by adding two new events which records value of process sv_flags to the trace file at process creation/execing/exiting time. MFC after: 1 Month.
Notes
Notes: svn path=/head/; revision=219042
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 1bc20a53c6d1..483103b624f9 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -557,10 +557,6 @@ do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2,
callout_init(&p2->p_itcallout, CALLOUT_MPSAFE);
-#ifdef KTRACE
- ktrprocfork(p1, p2);
-#endif
-
/*
* If PF_FORK is set, the child process inherits the
* procfs ioctl flags from its parent.
@@ -596,6 +592,10 @@ do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2,
p2->p_acflag = AFORK;
PROC_UNLOCK(p2);
+#ifdef KTRACE
+ ktrprocfork(p1, p2);
+#endif
+
/*
* Finish creating the child process. It will return via a different
* execution path later. (ie: directly into user mode)