Module Name: src
Committed By: ad
Date: Mon Jan 6 11:24:30 UTC 2020
Modified Files:
src/usr.bin/vmstat: vmstat.c
Log Message:
- Report namecache reverse hits with vmstat -s.
- ncvhashtbl is no more.
To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/vmstat/vmstat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.232 src/usr.bin/vmstat/vmstat.c:1.233
--- src/usr.bin/vmstat/vmstat.c:1.232 Sat Jan 4 03:09:55 2020
+++ src/usr.bin/vmstat/vmstat.c Mon Jan 6 11:24:30 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.232 2020/01/04 03:09:55 mrg Exp $ */
+/* $NetBSD: vmstat.c,v 1.233 2020/01/06 11:24:30 ad Exp $ */
/*-
* Copyright (c) 1998, 2000, 2001, 2007, 2019 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.232 2020/01/04 03:09:55 mrg Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.233 2020/01/06 11:24:30 ad Exp $");
#endif
#endif /* not lint */
@@ -230,15 +230,11 @@ struct nlist hashnl[] =
{ .n_name = "_nchash" },
#define X_NCHASHTBL 11
{ .n_name = "_nchashtbl" },
-#define X_NCVHASH 12
- { .n_name = "_ncvhash" },
-#define X_NCVHASHTBL 13
- { .n_name = "_ncvhashtbl" },
-#define X_NCVCACHEHASH 14
+#define X_NCVCACHEHASH 12
{ .n_name = "_vcache_hashmask" },
-#define X_NCVCACHETBL 15
+#define X_NCVCACHETBL 13
{ .n_name = "_vcache_hashtab" },
-#define X_HASHNL_SIZE 16 /* must be last */
+#define X_HASHNL_SIZE 14 /* must be last */
{ .n_name = NULL },
};
@@ -1117,6 +1113,7 @@ dosum(void)
(void)printf("%9" PRIu64 " too long\n", nch_stats.ncs_long);
(void)printf("%9" PRIu64 " pass2 hits\n", nch_stats.ncs_pass2);
(void)printf("%9" PRIu64 " 2passes\n", nch_stats.ncs_2passes);
+ (void)printf("%9" PRIu64 " reverse hits\n", nch_stats.ncs_revhits);
(void)printf(
"%9s cache hits (%d%% pos + %d%% neg) system %d%% per-process\n",
"", PCT(nch_stats.ncs_goodhits, nchtotal),
@@ -1895,10 +1892,6 @@ struct kernel_hash {
X_NCHASH, X_NCHASHTBL,
HASH_LIST, offsetof(struct namecache, nc_hash),
}, {
- "name cache directory hash",
- X_NCVHASH, X_NCVHASHTBL,
- HASH_LIST, offsetof(struct namecache, nc_vhash),
- }, {
"user info (uid -> used processes) hash",
X_UIHASH, X_UIHASHTBL,
HASH_LIST, offsetof(struct uidinfo, ui_hash),