summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-02-19 22:33:39 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-02-19 22:33:39 +0000
commit960849b55a261287d23f39db4c72eec6ca018575 (patch)
tree07ae8644b753c07514ad4a3f825ec0f4647248e6
parent8c564d68bc389bdd1892e6e302f625610afa0841 (diff)
Count number of forks, vforks, rforks; still need to count VM pages affected
by the various fork types
-rw-r--r--sys/kern/kern_fork.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 1209ce90350..589de5b0aec 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -70,7 +70,6 @@ sys_fork(p, v, retval)
void *v;
register_t *retval;
{
-
return (fork1(p, ISFORK, 0, retval));
}
@@ -80,7 +79,6 @@ sys_vfork(p, v, retval)
void *v;
register_t *retval;
{
-
return (fork1(p, ISVFORK, 0, retval));
}
@@ -316,6 +314,18 @@ again:
vm_fork(p1, p2);
#endif
+ switch (forktype) {
+ case ISFORK:
+ forkstat.cntfork++;
+ break;
+ case ISVFORK:
+ forkstat.cntvfork++;
+ break;
+ case ISRFORK:
+ forkstat.cntrfork++;
+ break;
+ }
+
/*
* Make child runnable, set start time, and add to run queue.
*/