Remove the obsolete "select collisions" count from vmstat(8) output.
Also, remove the reference of the now-nonexistent kernel variable
"nselcoll", and terminate the name list with a NULL as required by
kvm_nlist(3).
OK?
Index: vmstat.c
===================================================================
RCS file: src/usr.bin/vmstat/vmstat.c,v
retrieving revision 1.153
diff -u -p -r1.153 vmstat.c
--- vmstat.c 22 Feb 2022 17:35:01 -0000 1.153
+++ vmstat.c 25 Jul 2022 15:22:34 -0000
@@ -72,13 +72,11 @@ struct nlist namelist[] = {
{ "_bucket" },
#define X_FORKSTAT 5 /* sysctl */
{ "_forkstat" },
-#define X_NSELCOLL 6 /* sysctl */
- { "_nselcoll" },
-#define X_POOLHEAD 7 /* sysctl */
+#define X_POOLHEAD 6 /* sysctl */
{ "_pool_head" },
-#define X_NAPTIME 8
+#define X_NAPTIME 7
{ "_naptime" },
- { "" },
+ { NULL },
};
/* Objects defined in dkstats.c */
@@ -485,7 +483,7 @@ void
dosum(void)
{
struct nchstats nchstats;
- int mib[2], nselcoll;
+ int mib[2];
long long nchtotal;
size_t size;
@@ -571,19 +569,6 @@ dosum(void)
pct(nchstats.ncs_badhits, nchtotal),
pct(nchstats.ncs_falsehits, nchtotal),
pct(nchstats.ncs_long, nchtotal));
-
- if (nlistf == NULL && memf == NULL) {
- size = sizeof(nselcoll);
- mib[0] = CTL_KERN;
- mib[1] = KERN_NSELCOLL;
- if (sysctl(mib, 2, &nselcoll, &size, NULL, 0) == -1) {
- warn("could not read kern.nselcoll");
- nselcoll = 0;
- }
- } else {
- kread(X_NSELCOLL, &nselcoll, sizeof(nselcoll));
- }
- (void)printf("%11d select collisions\n", nselcoll);
}
void