summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-10-31 15:41:29 +0000
committerrwatson <rwatson@FreeBSD.org>2005-10-31 15:41:29 +0000
commitbe4f357149ecc68e1bf349f69f702cad430aec97 (patch)
treefe71f10c01688ab52e9bffd17c7d2ebd7d2c09b4 /sys/kern
parent5f4072340596bcd7e45343bc44317347b00f07e4 (diff)
downloadFreeBSD-src-be4f357149ecc68e1bf349f69f702cad430aec97.zip
FreeBSD-src-be4f357149ecc68e1bf349f69f702cad430aec97.tar.gz
Normalize a significant number of kernel malloc type names:
- Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/inflate.c2
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/kern/subr_sleepqueue.c2
-rw-r--r--sys/kern/uipc_usrreq.c1
-rw-r--r--sys/kern/vfs_bio.c2
-rw-r--r--sys/kern/vfs_cluster.c2
-rw-r--r--sys/kern/vfs_export.c2
-rw-r--r--sys/kern/vfs_hash.c2
-rw-r--r--sys/kern/vfs_subr.c2
9 files changed, 10 insertions, 9 deletions
diff --git a/sys/kern/inflate.c b/sys/kern/inflate.c
index 9ac6364..383ebc4 100644
--- a/sys/kern/inflate.c
+++ b/sys/kern/inflate.c
@@ -20,7 +20,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#ifdef _KERNEL
-static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
+static MALLOC_DEFINE(M_GZIP, "gzip_trees", "Gzip trees");
#endif
/* needed to make inflate() work */
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 25caa9f..5bf1553 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
-static MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table");
-static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "file desc to leader",
+static MALLOC_DEFINE(M_FILEDESC, "filedesc", "Open file descriptor table");
+static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader",
"file desc to leader structures");
static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures");
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 3def263..092c5c2 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -138,7 +138,7 @@ SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth,
#endif
static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
-static MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
+static MALLOC_DEFINE(M_SLEEPQUEUE, "sleepqueue", "sleep queues");
/*
* Prototypes for non-exported routines.
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 286f07c..439cd7d 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1614,6 +1614,7 @@ unp_gc(void)
LIST_FOREACH(fp, &filehead, f_list)
fp->f_gcflag &= ~(FMARK|FDEFER);
do {
+ KASSERT(unp_defer >= 0, ("unp_gc: unp_defer %d", unp_defer));
LIST_FOREACH(fp, &filehead, f_list) {
FILE_LOCK(fp);
/*
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index f475750..767504c 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
#include "opt_directio.h"
#include "opt_swap.h"
-static MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer");
+static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer");
struct bio_ops bioops; /* I/O operation notification */
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 01fa49e..885f1f9 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -58,7 +58,7 @@ SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rcluster, 0,
"Debug VFS clustering code");
#endif
-static MALLOC_DEFINE(M_SEGMENT, "cluster_save buffer", "cluster_save buffer");
+static MALLOC_DEFINE(M_SEGMENT, "cluster_save_buffer", "cluster_save buffer");
static struct cluster_save *
cluster_collectbufs(struct vnode *vp, struct buf *last_bp);
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 05e0f45..5552845 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <net/radix.h>
-static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
+static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure");
static void vfs_free_addrlist(struct netexport *nep);
static int vfs_free_netcred(struct radix_node *rn, void *w);
diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c
index c26c4c8..5523c56 100644
--- a/sys/kern/vfs_hash.c
+++ b/sys/kern/vfs_hash.c
@@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mount.h>
#include <sys/vnode.h>
-static MALLOC_DEFINE(M_VFS_HASH, "VFS hash", "VFS hash table");
+static MALLOC_DEFINE(M_VFS_HASH, "vfs_hash", "VFS hash table");
static LIST_HEAD(vfs_hash_head, vnode) *vfs_hash_tbl;
static LIST_HEAD(,vnode) vfs_hash_side;
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 32a630a..6ad6507 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_kern.h>
#include <vm/uma.h>
-static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
+static MALLOC_DEFINE(M_NETADDR, "subr_export_host", "Export host address structure");
static void delmntque(struct vnode *vp);
static void insmntque(struct vnode *vp, struct mount *mp);
OpenPOWER on IntegriCloud