Module Name: src Committed By: mrg Date: Thu Dec 1 02:09:03 UTC 2016
Modified Files: src/sys/uvm: files.uvm uvm_map.c Log Message: allow the sizes of the maphist and pdhist to be set in the config file via UVMHIST_MAPHIST_SIZE and UVMHIST_PDHIST_SIZE. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/files.uvm cvs rdiff -u -r1.341 -r1.342 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/files.uvm diff -u src/sys/uvm/files.uvm:1.26 src/sys/uvm/files.uvm:1.27 --- src/sys/uvm/files.uvm:1.26 Fri Aug 12 13:40:21 2016 +++ src/sys/uvm/files.uvm Thu Dec 1 02:09:03 2016 @@ -1,10 +1,11 @@ -# $NetBSD: files.uvm,v 1.26 2016/08/12 13:40:21 skrll Exp $ +# $NetBSD: files.uvm,v 1.27 2016/12/01 02:09:03 mrg Exp $ # # UVM options # defflag opt_uvmhist.h UVMHIST: KERNHIST defflag opt_uvmhist.h UVMHIST_PRINT: KERNHIST_PRINT +defparam opt_uvmhist.h UVMHIST_MAPHIST_SIZE UVMHIST_PDHIST_SIZE defflag opt_uvm.h USE_TOPDOWN_VM UVMMAP_COUNTERS defparam opt_uvm.h UVM_RESERVED_PAGES_PER_CPU defflag opt_vmswap.h VMSWAP Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.341 src/sys/uvm/uvm_map.c:1.342 --- src/sys/uvm/uvm_map.c:1.341 Sat Aug 6 15:13:14 2016 +++ src/sys/uvm/uvm_map.c Thu Dec 1 02:09:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.341 2016/08/06 15:13:14 maxv Exp $ */ +/* $NetBSD: uvm_map.c,v 1.342 2016/12/01 02:09:03 mrg Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.341 2016/08/06 15:13:14 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.342 2016/12/01 02:09:03 mrg Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -100,7 +100,13 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v #endif #ifdef UVMHIST -static struct kern_history_ent maphistbuf[100]; +#ifndef UVMHIST_MAPHIST_SIZE +#define UVMHIST_MAPHIST_SIZE 100 +#endif +#ifndef UVMHIST_PDHIST_SIZE +#define UVMHIST_PDHIST_SIZE 100 +#endif +static struct kern_history_ent maphistbuf[UVMHIST_MAPHIST_SIZE]; UVMHIST_DEFINE(maphist) = UVMHIST_INITIALIZER(maphist, maphistbuf); #endif @@ -884,7 +890,7 @@ void uvm_map_init(void) { #if defined(UVMHIST) - static struct kern_history_ent pdhistbuf[100]; + static struct kern_history_ent pdhistbuf[UVMHIST_PDHIST_SIZE]; #endif /*