Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm allow the sizes of the maphist and pdhist to be set ...



details:   https://anonhg.NetBSD.org/src/rev/44bd95b3b8a7
branches:  trunk
changeset: 819361:44bd95b3b8a7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Dec 01 02:09:03 2016 +0000

description:
allow the sizes of the maphist and pdhist to be set in the config
file via UVMHIST_MAPHIST_SIZE and UVMHIST_PDHIST_SIZE.

diffstat:

 sys/uvm/files.uvm |   3 ++-
 sys/uvm/uvm_map.c |  14 ++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (58 lines):

diff -r 2d044db6bd1c -r 44bd95b3b8a7 sys/uvm/files.uvm
--- a/sys/uvm/files.uvm Thu Dec 01 01:59:17 2016 +0000
+++ b/sys/uvm/files.uvm Thu Dec 01 02:09:03 2016 +0000
@@ -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
diff -r 2d044db6bd1c -r 44bd95b3b8a7 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Thu Dec 01 01:59:17 2016 +0000
+++ b/sys/uvm/uvm_map.c Thu Dec 01 02:09:03 2016 +0000
@@ -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 @@
 #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 @@
 uvm_map_init(void)
 {
 #if defined(UVMHIST)
-       static struct kern_history_ent pdhistbuf[100];
+       static struct kern_history_ent pdhistbuf[UVMHIST_PDHIST_SIZE];
 #endif
 
        /*



Home | Main Index | Thread Index | Old Index