Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/vmstat - Report namecache reverse hits with vmstat -s.



details:   https://anonhg.NetBSD.org/src/rev/4e02a5ea66c8
branches:  trunk
changeset: 968203:4e02a5ea66c8
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Jan 06 11:24:30 2020 +0000

description:
- Report namecache reverse hits with vmstat -s.
- ncvhashtbl is no more.

diffstat:

 usr.bin/vmstat/vmstat.c |  19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diffs (56 lines):

diff -r b56125aba1e9 -r 4e02a5ea66c8 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c   Mon Jan 06 11:23:31 2020 +0000
+++ b/usr.bin/vmstat/vmstat.c   Mon Jan 06 11:24:30 2020 +0000
@@ -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 @@
 #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 @@
        { .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 @@
        (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 @@
                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),



Home | Main Index | Thread Index | Old Index