summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-02-18 11:58:18 +0000
committertholo <tholo@openbsd.org>1996-02-18 11:58:18 +0000
commitb809f69e98911b16d8e297c1812bbb7ec29b4b54 (patch)
tree7af36db11c7d46e21c92ed3b1a5d64f9c5359b2e
parentCompile with -fno-strength-reduce for now (diff)
downloadwireguard-openbsd-b809f69e98911b16d8e297c1812bbb7ec29b4b54.tar.xz
wireguard-openbsd-b809f69e98911b16d8e297c1812bbb7ec29b4b54.zip
Count swapins and swapouts in the sum structure
-rw-r--r--sys/vm/vm_glue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index df95fb03fb2..5fd2d006a55 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -357,6 +357,8 @@ swapin(p)
p->p_flag |= P_INMEM;
splx(s);
p->p_swtime = 0;
+ cnt.v_swpin++;
+ cnt.v_pswpin += USPACE * CLSIZE / NBPG;
}
/*
@@ -545,6 +547,8 @@ swapout(p)
remrq(p);
splx(s);
p->p_swtime = 0;
+ cnt.v_swpin++;
+ cnt.v_pswpin += USPACE * CLSIZE / NBPG;
}
/*