summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-05-23 18:10:54 +0000
committerkib <kib@FreeBSD.org>2012-05-23 18:10:54 +0000
commit187a8c5cd64d6fbe329a4e3d5d0d4ccfe112ae69 (patch)
treef1b9ea9963df80f79a63e2a21d0fadf277e630a6 /sys/vm/vm_fault.c
parent1b7baa2fc1e9e62d27e339ef2a88d15ffe171da4 (diff)
downloadFreeBSD-src-187a8c5cd64d6fbe329a4e3d5d0d4ccfe112ae69.zip
FreeBSD-src-187a8c5cd64d6fbe329a4e3d5d0d4ccfe112ae69.tar.gz
Calculate the count of per-process cow faults. Export the count to
userspace using the obscure spare int field in struct kinfo_proc. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index fde5d4a..e3a29f0 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -805,6 +805,7 @@ vnode_locked:
if (!is_first_object_locked)
VM_OBJECT_LOCK(fs.object);
PCPU_INC(cnt.v_cow_faults);
+ curthread->td_cow++;
} else {
prot &= ~VM_PROT_WRITE;
}
OpenPOWER on IntegriCloud