Date: Mon, 22 Oct 2018 21:26:37 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339621 - stable/11/usr.bin/vmstat Message-ID: <201810222126.w9MLQbSt029136@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Oct 22 21:26:37 2018 New Revision: 339621 URL: https://svnweb.freebsd.org/changeset/base/339621 Log: MFC 338094: Fully retire the unimplemented -t option from vmstat(8). It was #ifdef'd out in the 4.4BSD import and hasn't been re-enabled since then. Modified: stable/11/usr.bin/vmstat/vmstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/11/usr.bin/vmstat/vmstat.c Mon Oct 22 21:25:28 2018 (r339620) +++ stable/11/usr.bin/vmstat/vmstat.c Mon Oct 22 21:26:37 2018 (r339621) @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); static char da[] = "da"; enum x_stats { X_SUM, X_HZ, X_STATHZ, X_NCHSTATS, X_INTRNAMES, X_SINTRNAMES, - X_INTRCNT, X_SINTRCNT, X_DEFICIT, X_REC, X_PGIN, X_XSTATS }; + X_INTRCNT, X_SINTRCNT }; static struct nlist namelist[] = { [X_SUM] = { .n_name = "_vm_cnt", }, @@ -94,12 +94,6 @@ static struct nlist namelist[] = { [X_SINTRNAMES] = { .n_name = "_sintrnames", }, [X_INTRCNT] = { .n_name = "_intrcnt", }, [X_SINTRCNT] = { .n_name = "_sintrcnt", }, -#ifdef notyet - [X_DEFICIT] = { .n_name = "_deficit", }, - [X_REC] = { .n_name = "_rectime", }, - [X_PGIN] = { .n_name = "_pgintime", }, - [X_XSTATS] = { .n_name = "_xstats", }, -#endif { .n_name = NULL, }, }; @@ -178,7 +172,7 @@ main(int argc, char *argv[]) if (argc < 0) return (argc); - while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:stw:z")) != -1) { + while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:sw:z")) != -1) { switch (c) { case 'a': aflag++; @@ -228,14 +222,6 @@ main(int argc, char *argv[]) case 's': todo |= SUMSTAT; break; - case 't': -#ifdef notyet - todo |= TIMESTAT; -#else - xo_errx(EX_USAGE, - "sorry, -t is not (re)implemented yet"); -#endif - break; case 'w': /* Convert to milliseconds. */ f = atof(optarg); @@ -339,10 +325,6 @@ retry_nlist: dosum(); if (todo & OBJSTAT) doobjstat(); -#ifdef notyet - if (todo & TIMESTAT) - dotimes(); -#endif if (todo & INTRSTAT) dointr(interval, reps); if (todo & VMSTAT) @@ -954,29 +936,6 @@ doresize(void) */ wresized = 0; } - -#ifdef notyet -static void -dotimes(void) -{ - unsigned int pgintime, rectime; - - kread(X_REC, &rectime, sizeof(rectime)); - kread(X_PGIN, &pgintime, sizeof(pgintime)); - kread(X_SUM, &sum, sizeof(sum)); - xo_emit("{:page-reclaims/%u} {N:reclaims}, " - "{:reclaim-time/%u} {N:total time (usec)}\n", - sum.v_pgrec, rectime); - xo_emit("{L:average}: {:reclaim-average/%u} {N:usec \\/ reclaim}\n", - rectime / sum.v_pgrec); - xo_emit("\n"); - xo_emit("{:page-ins/%u} {N:page ins}, " - "{:page-in-time/%u} {N:total time (msec)}\n", - sum.v_pgin, pgintime / 10); - xo_emit("{L:average}: {:average/%8.1f} {N:msec \\/ page in}\n", - pgintime / (sum.v_pgin * 10.0)); -} -#endif static long pct(long top, long bot)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810222126.w9MLQbSt029136>