Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern get the maxrss from the vmspace field,...
details: https://anonhg.NetBSD.org/src/rev/eeb33b708362
branches: trunk
changeset: 318883:eeb33b708362
user: christos <christos%NetBSD.org@localhost>
date: Tue May 08 19:34:54 2018 +0000
description:
get the maxrss from the vmspace field, and handle platforms that don't
have pmap statistics here.
diffstat:
sys/kern/kern_resource.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r b8a7f36f5e0c -r eeb33b708362 sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c Tue May 08 19:33:57 2018 +0000
+++ b/sys/kern/kern_resource.c Tue May 08 19:34:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_resource.c,v 1.178 2018/05/07 21:03:45 christos Exp $ */
+/* $NetBSD: kern_resource.c,v 1.179 2018/05/08 19:34:54 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.178 2018/05/07 21:03:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.179 2018/05/08 19:34:54 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -604,6 +604,12 @@
ru->ru_ixrss = vm->vm_tsize << (PAGE_SHIFT - 10);
ru->ru_idrss = vm->vm_dsize << (PAGE_SHIFT - 10);
ru->ru_isrss = vm->vm_ssize << (PAGE_SHIFT - 10);
+#ifdef __HAVE_NO_PMAP_STATS
+ /* We don't keep track of the max so we get the current */
+ ru->ru_maxrss = vm_resident_space(vm) << (PAGE_SHIFT - 10);
+#else
+ ru->ru_maxrss = vm->vm_rssmax << (PAGE_SHIFT - 10);
+#endif
}
void
Home |
Main Index |
Thread Index |
Old Index