From 6b72a0c2567b7ca171adda6655757e517810214d Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 9 May 2008 06:38:19 +0000 Subject: [PATCH] Fix fork/vfork statistics. forks and vforks were being improperly counted as rforks. --- sys/kern/kern_fork.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 3f7bd6e556..b3a8786bee 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -37,7 +37,7 @@ * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 * $FreeBSD: src/sys/kern/kern_fork.c,v 1.72.2.14 2003/06/26 04:15:10 silby Exp $ - * $DragonFly: src/sys/kern/kern_fork.c,v 1.75 2008/05/08 01:26:00 dillon Exp $ + * $DragonFly: src/sys/kern/kern_fork.c,v 1.76 2008/05/09 06:38:19 dillon Exp $ */ #include "opt_ktrace.h" @@ -505,10 +505,10 @@ fork1(struct lwp *lp1, int flags, struct proc **procp) */ lwp_fork(lp1, p2, flags); - if (flags == (RFFDG | RFPROC)) { + if (flags == (RFFDG | RFPROC | RFPGLOCK)) { mycpu->gd_cnt.v_forks++; mycpu->gd_cnt.v_forkpages += p2->p_vmspace->vm_dsize + p2->p_vmspace->vm_ssize; - } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { + } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM | RFPGLOCK)) { mycpu->gd_cnt.v_vforks++; mycpu->gd_cnt.v_vforkpages += p2->p_vmspace->vm_dsize + p2->p_vmspace->vm_ssize; } else if (p1 == &proc0) { -- 2.11.4.GIT