Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Use UVMHIST_INITIALIZER (KERNHIST_INITIALIZER) to st...
details: https://anonhg.NetBSD.org/src/rev/cc43e46a7bab
branches: trunk
changeset: 327340:cc43e46a7bab
user: matt <matt%NetBSD.org@localhost>
date: Wed Mar 05 05:35:55 2014 +0000
description:
Use UVMHIST_INITIALIZER (KERNHIST_INITIALIZER) to statically initialize
maphist. This allows maphist to used very very early in boot well before
uvm has been initialized.
diffstat:
sys/uvm/uvm_map.c | 10 +++++-----
sys/uvm/uvm_stat.h | 6 +++++-
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (72 lines):
diff -r 48205c30231c -r cc43e46a7bab sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Wed Mar 05 05:32:41 2014 +0000
+++ b/sys/uvm/uvm_map.c Wed Mar 05 05:35:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.327 2013/11/14 12:07:11 martin Exp $ */
+/* $NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt 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.327 2013/11/14 12:07:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -101,7 +101,8 @@
#endif
#ifdef UVMHIST
-UVMHIST_DEFINE(maphist);
+static struct kern_history_ent maphistbuf[100];
+UVMHIST_DEFINE(maphist) = UVMHIST_INITIALIZER(maphist, maphistbuf);
#endif
#if !defined(UVMMAP_COUNTERS)
@@ -875,7 +876,6 @@
uvm_map_init(void)
{
#if defined(UVMHIST)
- static struct kern_history_ent maphistbuf[100];
static struct kern_history_ent pdhistbuf[100];
#endif
@@ -884,7 +884,7 @@
*/
UVMHIST_FUNC("uvm_map_init");
- UVMHIST_INIT_STATIC(maphist, maphistbuf);
+ UVMHIST_LINK_STATIC(maphist);
UVMHIST_INIT_STATIC(pdhist, pdhistbuf);
UVMHIST_CALLED(maphist);
UVMHIST_LOG(maphist,"<starting uvm map system>", 0, 0, 0, 0);
diff -r 48205c30231c -r cc43e46a7bab sys/uvm/uvm_stat.h
--- a/sys/uvm/uvm_stat.h Wed Mar 05 05:32:41 2014 +0000
+++ b/sys/uvm/uvm_stat.h Wed Mar 05 05:35:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_stat.h,v 1.51 2012/07/30 23:56:48 matt Exp $ */
+/* $NetBSD: uvm_stat.h,v 1.52 2014/03/05 05:35:55 matt Exp $ */
/*
* Copyright (c) 2011 Matthew R. Green
@@ -55,6 +55,8 @@
#define UVMHIST_DEFINE(NAME) KERNHIST_DEFINE(NAME)
#define UVMHIST_INIT(NAME,N) KERNHIST_INIT(NAME,N)
#define UVMHIST_INIT_STATIC(NAME,BUF) KERNHIST_INIT_STATIC(NAME,BUF)
+#define UVMHIST_INITIALIZER(NAME,BUF) KERNHIST_INITIALIZER(NAME,BUF)
+#define UVMHIST_LINK_STATIC(NAME) KERNHIST_LINK_STATIC(NAME)
#define UVMHIST_LOG(NAME,FMT,A,B,C,D) KERNHIST_LOG(NAME,FMT,A,B,C,D)
#define UVMHIST_CALLED(NAME) KERNHIST_CALLED(NAME)
#define UVMHIST_FUNC(FNAME) KERNHIST_FUNC(FNAME)
@@ -65,6 +67,8 @@
#define UVMHIST_DEFINE(NAME)
#define UVMHIST_INIT(NAME,N)
#define UVMHIST_INIT_STATIC(NAME,BUF)
+#define UVMHIST_INITIALIZER(NAME,BUF)
+#define UVMHIST_LINK_STATIC(NAME)
#define UVMHIST_LOG(NAME,FMT,A,B,C,D)
#define UVMHIST_CALLED(NAME)
#define UVMHIST_FUNC(FNAME)
Home |
Main Index |
Thread Index |
Old Index