Move UVM "swpgonly" from Daemon Counters to Swap Counters
authorkn <kn@openbsd.org>
Sun, 27 Nov 2022 23:18:54 +0000 (23:18 +0000)
committerkn <kn@openbsd.org>
Sun, 27 Nov 2022 23:18:54 +0000 (23:18 +0000)
Put it below "swpginuse" as systat(1) and uvm_init(9) already have it.

(uvm.c struct uvmline uvmline[] makes it easy to misplace counters without
double-checking against actual systat output.)

usr.bin/systat/uvm.c

index 795626d..957b4db 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uvm.c,v 1.5 2019/06/28 13:35:04 deraadt Exp $ */
+/*     $OpenBSD: uvm.c,v 1.6 2022/11/27 23:18:54 kn Exp $      */
 /*
  * Copyright (c) 2008 Can Erkin Acar <canacar@openbsd.org>
  * Copyright (c) 2018 Kenneth R Westerback <krw@openbsd.org>
@@ -134,10 +134,10 @@ struct uvmline uvmline[] = {
          &uvmexp.swpginuse, &last_uvmexp.swpginuse, "swpginuse" },
        { &uvmexp.kmapent, &last_uvmexp.kmapent, "kmapent",
          &uvmexp.pdreact, &last_uvmexp.pdreact, "pdreact",
-         &uvmexp.nswget, &last_uvmexp.nswget, "nswget" },
+         &uvmexp.swpgonly, &last_uvmexp.swpgonly, "swpgonly" },
        { NULL, NULL, NULL,
          &uvmexp.pdbusy, &last_uvmexp.pdbusy, "pdbusy",
-         NULL, NULL, NULL },
+         &uvmexp.nswget, &last_uvmexp.nswget, "nswget" },
        { NULL, NULL, "Constants",
          &uvmexp.pdpageouts, &last_uvmexp.pdpageouts, "pdpageouts",
          NULL, NULL, NULL },