diff options
-rw-r--r-- | bin/ps/Makefile | 5 | ||||
-rw-r--r-- | lib/libkvm/Makefile | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_proc.c | 201 | ||||
-rw-r--r-- | libexec/rpc.rstatd/Makefile | 6 | ||||
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 31 | ||||
-rw-r--r-- | sbin/sysctl/Makefile | 6 | ||||
-rw-r--r-- | sbin/sysctl/sysctl.c | 10 | ||||
-rw-r--r-- | share/lkm/vfs/module/Makefile | 6 | ||||
-rw-r--r-- | share/mk/bsd.README | 6 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 9 | ||||
-rw-r--r-- | usr.bin/fstat/Makefile | 5 | ||||
-rw-r--r-- | usr.bin/systat/vmstat.c | 115 | ||||
-rw-r--r-- | usr.bin/top/Makefile | 5 | ||||
-rw-r--r-- | usr.bin/vmstat/Makefile | 5 | ||||
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 87 | ||||
-rw-r--r-- | usr.bin/w/Makefile | 5 | ||||
-rw-r--r-- | usr.sbin/pstat/Makefile | 5 |
17 files changed, 21 insertions, 492 deletions
diff --git a/bin/ps/Makefile b/bin/ps/Makefile index 0aefaa3930f..0b0fdb921f6 100644 --- a/bin/ps/Makefile +++ b/bin/ps/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2000/09/03 18:41:11 espie Exp $ +# $OpenBSD: Makefile,v 1.7 2001/06/27 06:16:44 art Exp $ PROG= ps SRCS= fmt.c keyword.c nlist.c print.c ps.c @@ -8,7 +8,4 @@ BINGRP= kmem BINMODE=2555 .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile index 42d51f67677..96317c6a1f2 100644 --- a/lib/libkvm/Makefile +++ b/lib/libkvm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2000/09/03 18:41:13 espie Exp $ +# $OpenBSD: Makefile,v 1.6 2001/06/27 06:16:45 art Exp $ # $NetBSD: Makefile,v 1.11 1996/03/18 22:33:07 thorpej Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/4/93 @@ -26,7 +26,3 @@ MLINKS+=kvm_dump.3 kvm_dump_mkheader.3 kvm_dump.3 kvm_dump_wrtheader.3 MLINKS+=kvm_dump.3 kvm_dump_inval.3 .include <bsd.lib.mk> - -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 6980f46e1ca..754adcd557e 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_proc.c,v 1.7 2001/05/18 09:08:38 art Exp $ */ +/* $OpenBSD: kvm_proc.c,v 1.8 2001/06/27 06:16:45 art Exp $ */ /* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ #if 0 static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93"; #else -static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.7 2001/05/18 09:08:38 art Exp $"; +static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.8 2001/06/27 06:16:45 art Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -104,12 +104,8 @@ static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.7 2001/05/18 09:08:38 art Exp $"; #include <vm/vm.h> #include <vm/vm_param.h> -#ifdef UVM #include <uvm/uvm_extern.h> #include <uvm/uvm_amap.h> -#else -#include <vm/swap_pager.h> -#endif #include <sys/sysctl.h> @@ -122,10 +118,6 @@ static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.7 2001/05/18 09:08:38 art Exp $"; #define KREAD(kd, addr, obj) \ (kvm_read(kd, addr, (void *)(obj), sizeof(*obj)) != sizeof(*obj)) -#ifndef UVM -int _kvm_readfromcore __P((kvm_t *, u_long, u_long)); -int _kvm_readfrompager __P((kvm_t *, struct vm_object *, u_long)); -#endif ssize_t kvm_uread __P((kvm_t *, const struct proc *, u_long, char *, size_t)); @@ -150,15 +142,10 @@ _kvm_uread(kd, p, va, cnt) u_long addr, head; u_long offset; struct vm_map_entry vme; -#ifdef UVM struct vm_amap amap; struct vm_anon *anonp, anon; struct vm_page pg; u_long slot; -#else - struct vm_object vmo; - int rv; -#endif if (kd->swapspc == 0) { kd->swapspc = (char *)_kvm_malloc(kd, kd->nbpg); @@ -177,22 +164,15 @@ _kvm_uread(kd, p, va, cnt) if (KREAD(kd, addr, &vme)) return (0); -#ifdef UVM if (va >= vme.start && va < vme.end && vme.aref.ar_amap != NULL) break; -#else - if (va >= vme.start && va < vme.end && - vme.object.vm_object != 0) - break; -#endif addr = (u_long)vme.next; if (addr == head) return (0); } -#ifdef UVM /* * we found the map entry, now to find the object... */ @@ -230,37 +210,6 @@ _kvm_uread(kd, p, va, cnt) return NULL; } } - -#else - /* - * We found the right object -- follow shadow links. - */ - offset = va - vme.start + vme.offset; - addr = (u_long)vme.object.vm_object; - - while (1) { - /* Try reading the page from core first. */ - if ((rv = _kvm_readfromcore(kd, addr, offset))) - break; - - if (KREAD(kd, addr, &vmo)) - return (0); - - /* If there is a pager here, see if it has the page. */ - if (vmo.pager != 0 && - (rv = _kvm_readfrompager(kd, &vmo, offset))) - break; - - /* Move down the shadow chain. */ - addr = (u_long)vmo.shadow; - if (addr == 0) - return (0); - offset += vmo.shadow_offset; - } - - if (rv == -1) - return (0); -#endif /* Found the page. */ offset %= kd->nbpg; @@ -268,152 +217,6 @@ _kvm_uread(kd, p, va, cnt) return (&kd->swapspc[offset]); } -#ifndef UVM - -#define vm_page_hash(kd, object, offset) \ - (((u_long)object + (u_long)(offset / kd->nbpg)) & kd->vm_page_hash_mask) - -int -_kvm_coreinit(kd) - kvm_t *kd; -{ - struct nlist nlist[3]; - - nlist[0].n_name = "_vm_page_buckets"; - nlist[1].n_name = "_vm_page_hash_mask"; - nlist[2].n_name = 0; - if (kvm_nlist(kd, nlist) != 0) - return (-1); - - if (KREAD(kd, nlist[0].n_value, &kd->vm_page_buckets) || - KREAD(kd, nlist[1].n_value, &kd->vm_page_hash_mask)) - return (-1); - - return (0); -} - -int -_kvm_readfromcore(kd, object, offset) - kvm_t *kd; - u_long object, offset; -{ - u_long addr; - struct pglist bucket; - struct vm_page mem; - off_t seekpoint; - - if (kd->vm_page_buckets == 0 && - _kvm_coreinit(kd)) - return (-1); - - addr = (u_long)&kd->vm_page_buckets[vm_page_hash(kd, object, offset)]; - if (KREAD(kd, addr, &bucket)) - return (-1); - - addr = (u_long)bucket.tqh_first; - offset &= ~(kd->nbpg -1); - while (1) { - if (addr == 0) - return (0); - - if (KREAD(kd, addr, &mem)) - return (-1); - - if ((u_long)mem.object == object && - (u_long)mem.offset == offset) - break; - - addr = (u_long)mem.hashq.tqe_next; - } - - seekpoint = mem.phys_addr; - - if (_kvm_pread(kd, kd->pmfd, kd->swapspc, kd->nbpg, (off_t)seekpoint) != kd->nbpg) { - return (-1); - } - - return (1); -} - -int -_kvm_readfrompager(kd, vmop, offset) - kvm_t *kd; - struct vm_object *vmop; - u_long offset; -{ - u_long addr; - struct pager_struct pager; - struct swpager swap; - int ix; - struct swblock swb; - off_t seekpoint; - - /* Read in the pager info and make sure it's a swap device. */ - addr = (u_long)vmop->pager; - if (KREAD(kd, addr, &pager) || pager.pg_type != PG_SWAP) - return (-1); - - /* Read in the swap_pager private data. */ - addr = (u_long)pager.pg_data; - if (KREAD(kd, addr, &swap)) - return (-1); - - /* - * Calculate the paging offset, and make sure it's within the - * bounds of the pager. - */ - offset += vmop->paging_offset; - ix = offset / dbtob(swap.sw_bsize); -#if 0 - if (swap.sw_blocks == 0 || ix >= swap.sw_nblocks) - return (-1); -#else - if (swap.sw_blocks == 0 || ix >= swap.sw_nblocks) { - int i; - printf("BUG BUG BUG BUG:\n"); - printf("object %x offset %x pgoffset %x pager %x swpager %x\n", - vmop, offset - vmop->paging_offset, vmop->paging_offset, - vmop->pager, pager.pg_data); - printf("osize %x bsize %x blocks %x nblocks %x\n", - swap.sw_osize, swap.sw_bsize, swap.sw_blocks, - swap.sw_nblocks); - for (ix = 0; ix < swap.sw_nblocks; ix++) { - addr = (u_long)&swap.sw_blocks[ix]; - if (KREAD(kd, addr, &swb)) - return (0); - printf("sw_blocks[%d]: block %x mask %x\n", ix, - swb.swb_block, swb.swb_mask); - } - return (-1); - } -#endif - - /* Read in the swap records. */ - addr = (u_long)&swap.sw_blocks[ix]; - if (KREAD(kd, addr, &swb)) - return (-1); - - /* Calculate offset within pager. */ - offset %= dbtob(swap.sw_bsize); - - /* Check that the page is actually present. */ - if ((swb.swb_mask & (1 << (offset / kd->nbpg))) == 0) - return (0); - - if (!ISALIVE(kd)) - return (-1); - - /* Calculate the physical address and read the page. */ - seekpoint = dbtob(swb.swb_block) + (offset & ~(kd->nbpg -1)); - - if (_kvm_pread(kd, kd->swfd, kd->swapspc, kd->nbpg, (off_t)seekpoint) != kd->nbpg) { - return (-1); - } - - return (1); -} -#endif /* UVM */ - /* * Read proc's from memory file into buffer bp, which has space to hold * at most maxcnt procs. diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile index 8fd7dbd3ac8..3982bd9ce10 100644 --- a/libexec/rpc.rstatd/Makefile +++ b/libexec/rpc.rstatd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2001/01/28 19:34:31 niklas Exp $ +# $OpenBSD: Makefile,v 1.6 2001/06/27 06:16:46 art Exp $ PROG = rpc.rstatd .PATH: ${.CURDIR}/../../usr.bin/vmstat @@ -13,7 +13,3 @@ LDADD= -lrpcsvc -lkvm .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif - diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 39f5b8d3344..73c5776bb91 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt Exp $ */ +/* $OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -31,7 +31,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/ /*static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";*/ -static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $"; #endif /* @@ -62,11 +62,9 @@ static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt #endif #include <net/if.h> -#if defined(UVM) #include <vm/vm.h> #include <sys/sysctl.h> #include <uvm/uvm_extern.h> -#endif #undef FSHIFT /* Use protocol's shift and scale values */ #undef FSCALE @@ -99,10 +97,6 @@ struct nlist nl[] = { #define X_CNT 5 { "_cnt" }, #else -#ifndef UVM -#define X_CNT 2 - { "_cnt" }, -#endif #endif { NULL }, }; @@ -214,13 +208,9 @@ updatestat() { long off; int i, save_errno = errno; -#ifdef UVM struct uvmexp uvmexp; int mib[2]; size_t len; -#else - struct vmmeter cnt; -#endif struct ifnet ifnet; double avrun[3]; struct timeval tm, btm; @@ -291,7 +281,6 @@ updatestat() stats_all.s1.cp_time[3]); #endif -#ifdef UVM mib[0] = CTL_VM; mib[1] = VM_UVMEXP; len = sizeof(uvmexp); @@ -308,22 +297,6 @@ updatestat() gettimeofday(&tm, (struct timezone *) 0); stats_all.s1.v_intr -= hz*(tm.tv_sec - btm.tv_sec) + hz*(tm.tv_usec - btm.tv_usec)/1000000; -#else - if (kvm_read(kfd, (long)nl[X_CNT].n_value, (char *)&cnt, sizeof cnt) != - sizeof cnt) { - syslog(LOG_ERR, "can't read cnt from kmem"); - exit(1); - } - stats_all.s1.v_pgpgin = cnt.v_pgpgin; - stats_all.s1.v_pgpgout = cnt.v_pgpgout; - stats_all.s1.v_pswpin = cnt.v_pswpin; - stats_all.s1.v_pswpout = cnt.v_pswpout; - stats_all.s1.v_intr = cnt.v_intr; - gettimeofday(&tm, (struct timezone *) 0); - stats_all.s1.v_intr -= hz*(tm.tv_sec - btm.tv_sec) + - hz*(tm.tv_usec - btm.tv_usec)/1000000; - stats_all.s2.v_swtch = cnt.v_swtch; -#endif #ifndef BSD if (kvm_read(kfd, (long)nl[X_DKXFER].n_value, diff --git a/sbin/sysctl/Makefile b/sbin/sysctl/Makefile index 45e780bcbbb..3a1e97fe821 100644 --- a/sbin/sysctl/Makefile +++ b/sbin/sysctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2000/09/03 18:41:16 espie Exp $ +# $OpenBSD: Makefile,v 1.8 2001/06/27 06:16:46 art Exp $ PROG= sysctl MAN= sysctl.8 @@ -9,7 +9,3 @@ afterinstall: (cd ${DESTDIR}/usr/sbin; ln -sf ../../sbin/sysctl .) .include <bsd.prog.mk> - -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 2d5b7374dce..fa613e589d9 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.72 2001/06/22 23:17:27 art Exp $ */ +/* $OpenBSD: sysctl.c,v 1.73 2001/06/27 06:16:47 art Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95"; #else -static char *rcsid = "$OpenBSD: sysctl.c,v 1.72 2001/06/22 23:17:27 art Exp $"; +static char *rcsid = "$OpenBSD: sysctl.c,v 1.73 2001/06/27 06:16:47 art Exp $"; #endif #endif /* not lint */ @@ -88,9 +88,7 @@ static char *rcsid = "$OpenBSD: sysctl.c,v 1.72 2001/06/22 23:17:27 art Exp $"; #include <netinet6/pim6_var.h> #endif -#ifdef UVM #include <uvm/uvm_swap_encrypt.h> -#endif #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> @@ -450,7 +448,6 @@ parse(string, flags) (void)printf("%p\n", _ps.val); return; } -#ifdef UVM else if (mib[1] == VM_SWAPENCRYPT) { len = sysctl_swpenc(string, &bufp, mib, flags, &type); if (len < 0) @@ -458,7 +455,6 @@ parse(string, flags) break; } -#endif if (flags == 0) return; warnx("use vmstat or systat to view %s information", string); @@ -1178,7 +1174,6 @@ sysctl_bios(string, bufpp, mib, flags, typep) } #endif -#ifdef UVM struct ctlname swpencname[] = CTL_SWPENC_NAMES; struct list swpenclist = { swpencname, SWPENC_MAXID }; @@ -1205,7 +1200,6 @@ sysctl_swpenc(string, bufpp, mib, flags, typep) *typep = swpenclist.list[indx].ctl_type; return(3); } -#endif struct ctlname inetname[] = CTL_IPPROTO_NAMES; struct ctlname ipname[] = IPCTL_NAMES; diff --git a/share/lkm/vfs/module/Makefile b/share/lkm/vfs/module/Makefile index a301f96d11a..ad71e65b057 100644 --- a/share/lkm/vfs/module/Makefile +++ b/share/lkm/vfs/module/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2000/09/03 18:41:17 espie Exp $ +# $OpenBSD: Makefile,v 1.7 2001/06/27 06:16:47 art Exp $ # # Makefile for newsyscall # @@ -69,10 +69,6 @@ $(MODOBJ): $(OBJS) $(KOBJS) .include <bsd.own.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif - # # EOF -- This file has not been truncated. # diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 637dbfa28f9..1eddcc952a3 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.README,v 1.24 2001/06/20 11:49:24 mpech Exp $ +# $OpenBSD: bsd.README,v 1.25 2001/06/27 06:16:48 art Exp $ # $NetBSD: bsd.README,v 1.17 1996/04/13 02:08:08 thorpej Exp $ # @(#)bsd.README 5.1 (Berkeley) 5/11/90 @@ -263,10 +263,6 @@ GLOBAL_AUTOCONF_CACHE Be careful! Redundant tests may not be redundant if you are installing substantially updated gnu programs. -UVM - Set to yes on machines that switched to the new unified - vm. Temporary, until everything supports uvm. - bsd.own.mk is generally useful when building your own Makefiles so that they use the same default owners etc. as the rest of the tree. diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 6c9105b7b85..0b85bb7c42c 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.own.mk,v 1.48 2001/06/26 21:37:48 miod Exp $ +# $OpenBSD: bsd.own.mk,v 1.49 2001/06/27 06:16:48 art Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ # Host-specific overrides @@ -8,13 +8,6 @@ .include "/etc/mk.conf" .endif -# XXX - This is temporary until everyone uses UVM -.if (${MACHINE} == "sun3") -UVM?= no -.else -UVM?= yes -.endif - # Set `SKEY' to `yes' to build with support for S/key authentication. SKEY?= yes # Set `KERBEROS' to `yes' to build with support for Kerberos authentication. diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile index f95b67ac892..9390a5d2693 100644 --- a/usr.bin/fstat/Makefile +++ b/usr.bin/fstat/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2000/09/03 18:41:17 espie Exp $ +# $OpenBSD: Makefile,v 1.8 2001/06/27 06:16:49 art Exp $ PROG= fstat DPADD= ${LIBKVM} @@ -11,6 +11,3 @@ CFLAGS+=-DINET6 .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 2d9bb1e41f7..fce98a6d58c 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.23 2001/06/22 14:57:21 lebel Exp $ */ +/* $OpenBSD: vmstat.c,v 1.24 2001/06/27 06:16:49 art Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -static char rcsid[] = "$OpenBSD: vmstat.c,v 1.23 2001/06/22 14:57:21 lebel Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.24 2001/06/27 06:16:49 art Exp $"; #endif /* not lint */ /* @@ -56,9 +56,7 @@ static char rcsid[] = "$OpenBSD: vmstat.c,v 1.23 2001/06/22 14:57:21 lebel Exp $ #include <sys/sysctl.h> #include <vm/vm.h> -#if defined(UVM) #include <uvm/uvm_extern.h> -#endif #include <ctype.h> #include <err.h> @@ -81,11 +79,7 @@ static char rcsid[] = "$OpenBSD: vmstat.c,v 1.23 2001/06/22 14:57:21 lebel Exp $ static struct Info { long time[CPUSTATES]; -#if defined(UVM) struct uvmexp uvmexp; -#else - struct vmmeter Cnt; -#endif struct vmtotal Total; struct nchstats nchstats; long nchcount; @@ -152,13 +146,8 @@ closekre(w) static struct nlist namelist[] = { #define X_CPTIME 0 { "_cp_time" }, -#if defined(UVM) #define X_UVMEXP 1 { "_uvmexp" }, -#else -#define X_CNT 1 - { "_cnt" }, -#endif #define X_NCHSTATS 2 { "_nchstats" }, #define X_INTRNAMES 3 @@ -321,7 +310,6 @@ labelkre() clear(); mvprintw(STATROW, STATCOL + 4, "users Load"); -#if defined(UVM) mvprintw(MEMROW, MEMCOL, " memory totals (in KB)"); mvprintw(MEMROW + 1, MEMCOL, " real virtual free"); mvprintw(MEMROW + 2, MEMCOL, "Active"); @@ -331,25 +319,10 @@ labelkre() mvprintw(PAGEROW + 1, PAGECOL, " in out in out "); mvprintw(PAGEROW + 2, PAGECOL, "ops"); mvprintw(PAGEROW + 3, PAGECOL, "pages"); -#else - - mvprintw(MEMROW, MEMCOL, "Mem:KB REAL VIRTUAL"); - mvprintw(MEMROW + 1, MEMCOL, " Tot Share Tot Share"); - mvprintw(MEMROW + 2, MEMCOL, "Act"); - mvprintw(MEMROW + 3, MEMCOL, "All"); - - mvprintw(MEMROW + 1, MEMCOL + 32, "Free"); - - mvprintw(PAGEROW, PAGECOL, " PAGING SWAPPING "); - mvprintw(PAGEROW + 1, PAGECOL, " in out in out "); - mvprintw(PAGEROW + 2, PAGECOL, "count"); - mvprintw(PAGEROW + 3, PAGECOL, "pages"); -#endif mvprintw(INTSROW, INTSCOL + 3, " Interrupts"); mvprintw(INTSROW + 1, INTSCOL + 9, "total"); -#if defined(UVM) mvprintw(VMSTATROW + 0, VMSTATCOL + 10, "forks"); mvprintw(VMSTATROW + 1, VMSTATCOL + 10, "fkppw"); mvprintw(VMSTATROW + 2, VMSTATCOL + 10, "fksvm"); @@ -368,36 +341,12 @@ labelkre() mvprintw(VMSTATROW + 15, VMSTATCOL + 10, "pdfre"); if (LINES - 1 > VMSTATROW + 16) mvprintw(VMSTATROW + 16, VMSTATCOL + 10, "pdscn"); -#else - mvprintw(VMSTATROW + 0, VMSTATCOL + 10, "cow"); - mvprintw(VMSTATROW + 1, VMSTATCOL + 10, "objlk"); - mvprintw(VMSTATROW + 2, VMSTATCOL + 10, "objht"); - mvprintw(VMSTATROW + 3, VMSTATCOL + 10, "zfod"); - mvprintw(VMSTATROW + 4, VMSTATCOL + 10, "nzfod"); - mvprintw(VMSTATROW + 5, VMSTATCOL + 10, "%%zfod"); - mvprintw(VMSTATROW + 6, VMSTATCOL + 10, "kern"); - mvprintw(VMSTATROW + 7, VMSTATCOL + 10, "wire"); - mvprintw(VMSTATROW + 8, VMSTATCOL + 10, "act"); - mvprintw(VMSTATROW + 9, VMSTATCOL + 10, "inact"); - mvprintw(VMSTATROW + 10, VMSTATCOL + 10, "free"); - mvprintw(VMSTATROW + 11, VMSTATCOL + 10, "daefr"); - mvprintw(VMSTATROW + 12, VMSTATCOL + 10, "prcfr"); - mvprintw(VMSTATROW + 13, VMSTATCOL + 10, "react"); - mvprintw(VMSTATROW + 14, VMSTATCOL + 10, "scan"); - mvprintw(VMSTATROW + 15, VMSTATCOL + 10, "hdrev"); - if (LINES - 1 > VMSTATROW + 16) - mvprintw(VMSTATROW + 16, VMSTATCOL + 10, "intrn"); -#endif mvprintw(GENSTATROW, GENSTATCOL, " Csw Trp Sys Int Sof Flt"); mvprintw(GRAPHROW, GRAPHCOL, " . %% Sys . %% User . %% Nice . %% Idle"); -#if defined(UVM) mvprintw(PROCSROW, PROCSCOL, "Proc:r d s w"); -#else - mvprintw(PROCSROW, PROCSCOL, "Proc:r d s w p"); -#endif mvprintw(GRAPHROW + 1, GRAPHCOL, "| | | | | | | | | | |"); @@ -527,13 +476,8 @@ showkre() putfloat(avenrun[1], STATROW, STATCOL + 23, 6, 2, 0); putfloat(avenrun[2], STATROW, STATCOL + 29, 6, 2, 0); mvaddstr(STATROW, STATCOL + 53, buf); -#if defined(UVM) #define pgtokb(pg) ((pg) * s.uvmexp.pagesize / 1024) -#else -#define pgtokb(pg) ((pg) * cnt.v_page_size / 1024) -#endif -#if defined(UVM) putint(pgtokb(s.uvmexp.active), MEMROW + 2, MEMCOL + 6, 7); putint(pgtokb(s.uvmexp.active + s.uvmexp.swpginuse), /* XXX */ MEMROW + 2, MEMCOL + 16, 7); @@ -543,26 +487,11 @@ showkre() putint(pgtokb(s.uvmexp.free), MEMROW + 2, MEMCOL + 24, 7); putint(pgtokb(s.uvmexp.free + s.uvmexp.swpages - s.uvmexp.swpginuse), MEMROW + 3, MEMCOL + 24, 7); -#else - putint(pgtokb(total.t_arm), MEMROW + 2, MEMCOL + 3, 6); - putint(pgtokb(total.t_armshr), MEMROW + 2, MEMCOL + 9, 6); - putint(pgtokb(total.t_avm), MEMROW + 2, MEMCOL + 15, 7); - putint(pgtokb(total.t_avmshr), MEMROW + 2, MEMCOL + 22, 7); - putint(pgtokb(total.t_rm), MEMROW + 3, MEMCOL + 3, 6); - putint(pgtokb(total.t_rmshr), MEMROW + 3, MEMCOL + 9, 6); - putint(pgtokb(total.t_vm), MEMROW + 3, MEMCOL + 15, 7); - putint(pgtokb(total.t_vmshr), MEMROW + 3, MEMCOL + 22, 7); - putint(pgtokb(total.t_free), MEMROW + 2, MEMCOL + 30, 6); -#endif putint(total.t_rq - 1, PROCSROW + 1, PROCSCOL + 3, 3); putint(total.t_dw, PROCSROW + 1, PROCSCOL + 6, 3); putint(total.t_sl, PROCSROW + 1, PROCSCOL + 9, 3); putint(total.t_sw, PROCSROW + 1, PROCSCOL + 12, 3); -#if !defined(UVM) - putint(total.t_pw, PROCSROW + 1, PROCSCOL + 15, 3); -#endif -#if defined(UVM) PUTRATE(uvmexp.forks, VMSTATROW + 0, VMSTATCOL + 3, 6); PUTRATE(uvmexp.forks_ppwait, VMSTATROW + 1, VMSTATCOL + 3, 6); PUTRATE(uvmexp.forks_sharevm, VMSTATROW + 2, VMSTATCOL + 3, 6); @@ -595,42 +524,6 @@ showkre() PUTRATE(uvmexp.intrs, GENSTATROW + 1, GENSTATCOL + 15, 5); PUTRATE(uvmexp.softs, GENSTATROW + 1, GENSTATCOL + 20, 5); PUTRATE(uvmexp.faults, GENSTATROW + 1, GENSTATCOL + 25, 5); -#else - PUTRATE(Cnt.v_cow_faults, VMSTATROW + 0, VMSTATCOL + 3, 6); - PUTRATE(Cnt.v_lookups, VMSTATROW + 1, VMSTATCOL + 3, 6); - PUTRATE(Cnt.v_hits, VMSTATROW + 2, VMSTATCOL + 3, 6); - PUTRATE(Cnt.v_zfod, VMSTATROW + 3, VMSTATCOL + 4, 5); - PUTRATE(Cnt.v_nzfod, VMSTATROW + 4, VMSTATCOL + 3, 6); - putfloat(cnt.v_nzfod == 0 ? 0.0 : (100.0 * cnt.v_zfod / cnt.v_nzfod), - VMSTATROW + 5, VMSTATCOL + 2, 7, 2, 1); - putint(pgtokb(cnt.v_kernel_pages), VMSTATROW + 6, VMSTATCOL, 9); - putint(pgtokb(cnt.v_wire_count), VMSTATROW + 7, VMSTATCOL, 9); - putint(pgtokb(cnt.v_active_count), VMSTATROW + 8, VMSTATCOL, 9); - putint(pgtokb(cnt.v_inactive_count), VMSTATROW + 9, VMSTATCOL, 9); - putint(pgtokb(cnt.v_free_count), VMSTATROW + 10, VMSTATCOL, 9); - PUTRATE(Cnt.v_dfree, VMSTATROW + 11, VMSTATCOL, 9); - PUTRATE(Cnt.v_pfree, VMSTATROW + 12, VMSTATCOL, 9); - PUTRATE(Cnt.v_reactivated, VMSTATROW + 13, VMSTATCOL, 9); - PUTRATE(Cnt.v_scan, VMSTATROW + 14, VMSTATCOL, 9); - PUTRATE(Cnt.v_rev, VMSTATROW + 15, VMSTATCOL, 9); - if (LINES - 1 > VMSTATROW + 16) { - PUTRATE(Cnt.v_intrans, VMSTATROW + 16, VMSTATCOL, 9); - } - PUTRATE(Cnt.v_pageins, PAGEROW + 2, PAGECOL + 5, 5); - PUTRATE(Cnt.v_pageouts, PAGEROW + 2, PAGECOL + 10, 5); - PUTRATE(Cnt.v_swpin, PAGEROW + 2, PAGECOL + 15, 5); /* - */ - PUTRATE(Cnt.v_swpout, PAGEROW + 2, PAGECOL + 20, 5); /* - */ - PUTRATE(Cnt.v_pgpgin, PAGEROW + 3, PAGECOL + 5, 5); /* ? */ - PUTRATE(Cnt.v_pgpgout, PAGEROW + 3, PAGECOL + 10, 5); /* ? */ - PUTRATE(Cnt.v_pswpin, PAGEROW + 3, PAGECOL + 15, 5); /* - */ - PUTRATE(Cnt.v_pswpout, PAGEROW + 3, PAGECOL + 20, 5); /* - */ - PUTRATE(Cnt.v_swtch, GENSTATROW + 1, GENSTATCOL, 5); - PUTRATE(Cnt.v_trap, GENSTATROW + 1, GENSTATCOL + 5, 5); - PUTRATE(Cnt.v_syscall, GENSTATROW + 1, GENSTATCOL + 10, 5); - PUTRATE(Cnt.v_intr, GENSTATROW + 1, GENSTATCOL + 15, 5); - PUTRATE(Cnt.v_soft, GENSTATROW + 1, GENSTATCOL + 20, 5); - PUTRATE(Cnt.v_faults, GENSTATROW + 1, GENSTATCOL + 25, 5); -#endif mvprintw(DISKROW, DISKCOL + 5, " "); for (i = 0, c = 0; i < dk_ndrive && c < MAXDRIVES; i++) if (dk_select[i]) { @@ -765,11 +658,7 @@ getinfo(s, st) dkreadstats(); NREAD(X_CPTIME, s->time, sizeof s->time); -#if defined(UVM) NREAD(X_UVMEXP, &s->uvmexp, sizeof s->uvmexp); -#else - NREAD(X_CNT, &s->Cnt, sizeof s->Cnt); -#endif NREAD(X_NCHSTATS, &s->nchstats, sizeof s->nchstats); #if defined(__i386__) NREAD(X_INTRHAND, intrhand, sizeof(intrhand)); diff --git a/usr.bin/top/Makefile b/usr.bin/top/Makefile index cc20240aa72..8c2fddc63a5 100644 --- a/usr.bin/top/Makefile +++ b/usr.bin/top/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2001/02/17 23:01:40 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2001/06/27 06:16:49 art Exp $ # # Makefile for OpenBSD top-3.4. @@ -19,6 +19,3 @@ sigdesc.h: sigconv.awk .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/usr.bin/vmstat/Makefile b/usr.bin/vmstat/Makefile index 77e36ae4862..effbf02831a 100644 --- a/usr.bin/vmstat/Makefile +++ b/usr.bin/vmstat/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2000/09/03 18:41:20 espie Exp $ +# $OpenBSD: Makefile,v 1.7 2001/06/27 06:16:50 art Exp $ PROG= vmstat @@ -11,6 +11,3 @@ BINMODE=2555 .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index c8bd545e0d8..0bc67bbabcf 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.56 2001/06/24 20:30:52 angelos Exp $ */ +/* $OpenBSD: vmstat.c,v 1.57 2001/06/27 06:16:50 art Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -79,19 +79,12 @@ static char rcsid[] = "$NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp #include <limits.h> #include "dkstats.h" -#ifdef UVM #include <uvm/uvm_object.h> #include <uvm/uvm_extern.h> -#endif struct nlist namelist[] = { -#if defined(UVM) #define X_UVMEXP 0 { "_uvmexp" }, -#else -#define X_SUM 0 - { "_cnt" }, -#endif #define X_BOOTTIME 1 { "_boottime" }, #define X_NCHSTATS 2 @@ -131,11 +124,7 @@ extern struct _disk cur; extern char **dr_name; extern int *dk_select, dk_ndrive; -#ifdef UVM struct uvmexp uvmexp, ouvmexp; -#else -struct vmmeter sum, osum; -#endif int ndrives; int winlines = 20; @@ -404,7 +393,6 @@ dovmstat(interval, reps) printhdr(); /* Read new disk statistics */ dkreadstats(); -#ifdef UVM if (nlistf == NULL && memf == NULL) { size = sizeof(struct uvmexp); mib[0] = CTL_VM; @@ -416,9 +404,6 @@ dovmstat(interval, reps) } else { kread(X_UVMEXP, &uvmexp, sizeof(struct uvmexp)); } -#else - kread(X_SUM, &sum, sizeof(sum)); -#endif size = sizeof(total); mib[0] = CTL_VM; mib[1] = VM_METER; @@ -429,14 +414,9 @@ dovmstat(interval, reps) (void)printf("%2u%2u%2u", total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw); #define rate(x) (((x) + halfuptime) / uptime) /* round */ -#ifdef UVM #define pgtok(a) ((a) * ((int)uvmexp.pagesize >> 10)) -#else -#define pgtok(a) ((a) * ((int)sum.v_page_size >> 10)) -#endif (void)printf("%7u%7u ", pgtok(total.t_avm), pgtok(total.t_free)); -#ifdef UVM (void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults)); (void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact)); (void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins)); @@ -448,30 +428,12 @@ dovmstat(interval, reps) rate(uvmexp.intrs - ouvmexp.intrs), rate(uvmexp.syscalls - ouvmexp.syscalls), rate(uvmexp.swtch - ouvmexp.swtch)); -#else - (void)printf("%4u ", rate(sum.v_faults - osum.v_faults)); - (void)printf("%3u ", - rate(sum.v_reactivated - osum.v_reactivated)); - (void)printf("%3u ", rate(sum.v_pageins - osum.v_pageins)); - (void)printf("%3u %3u ", - rate(sum.v_pageouts - osum.v_pageouts), 0); - (void)printf("%3u ", rate(sum.v_scan - osum.v_scan)); - dkstats(); - (void)printf("%4u %4u %3u ", - rate(sum.v_intr - osum.v_intr), - rate(sum.v_syscall - osum.v_syscall), - rate(sum.v_swtch - osum.v_swtch)); -#endif cpustats(); (void)printf("\n"); (void)fflush(stdout); if (reps >= 0 && --reps <= 0) break; -#ifdef UVM ouvmexp = uvmexp; -#else - osum = sum; -#endif uptime = interval; /* * We round upward to avoid losing low-frequency events @@ -526,7 +488,6 @@ dotimes() pgintime = 0; rectime = 0; -#ifdef UVM if (nlistf == NULL && memf == NULL) { size = sizeof(struct uvmexp); mib[0] = CTL_VM; @@ -547,17 +508,6 @@ dotimes() uvmexp.pageins, pgintime / 10); (void)printf("average: %8.1f msec / page in\n", pgintime / (uvmexp.pageins * 10.0)); -#else - kread(X_SUM, &sum, sizeof(sum)); - (void)printf("%u reactivates, %u total time (usec)\n", - sum.v_reactivated, rectime); - (void)printf("average: %u usec / reclaim\n", rectime / sum.v_reactivated); - (void)printf("\n"); - (void)printf("%u page ins, %u total time (msec)\n", - sum.v_pageins, pgintime / 10); - (void)printf("average: %8.1f msec / page in\n", - pgintime / (sum.v_pageins * 10.0)); -#endif } int @@ -582,7 +532,6 @@ dosum() size_t size; int mib[2], nselcoll; -#ifdef UVM if (nlistf == NULL && memf == NULL) { size = sizeof(struct uvmexp); mib[0] = CTL_VM; @@ -638,40 +587,6 @@ dosum() (void)printf("%11u pages scanned by pagedaemon\n", uvmexp.pdscans); (void)printf("%11u pages reactivated by pagedaemon\n", uvmexp.pdreact); (void)printf("%11u busy pages found by pagedaemon\n", uvmexp.pdbusy); -#else - kread(X_SUM, &sum, sizeof(sum)); - (void)printf("%11u cpu context switches\n", sum.v_swtch); - (void)printf("%11u device interrupts\n", sum.v_intr); - (void)printf("%11u software interrupts\n", sum.v_soft); - (void)printf("%11u traps\n", sum.v_trap); - (void)printf("%11u system calls\n", sum.v_syscall); - (void)printf("%11u total faults taken\n", sum.v_faults); - (void)printf("%11u swap ins\n", sum.v_swpin); - (void)printf("%11u swap outs\n", sum.v_swpout); - (void)printf("%11u pages swapped in\n", sum.v_pswpin); - (void)printf("%11u pages swapped out\n", sum.v_pswpout); - (void)printf("%11u page ins\n", sum.v_pageins); - (void)printf("%11u page outs\n", sum.v_pageouts); - (void)printf("%11u pages paged in\n", sum.v_pgpgin); - (void)printf("%11u pages paged out\n", sum.v_pgpgout); - (void)printf("%11u pages reactivated\n", sum.v_reactivated); - (void)printf("%11u intransit blocking page faults\n", sum.v_intrans); - (void)printf("%11u zero fill pages created\n", sum.v_nzfod); - (void)printf("%11u zero fill page faults\n", sum.v_zfod); - (void)printf("%11u pages examined by the clock daemon\n", sum.v_scan); - (void)printf("%11u revolutions of the clock hand\n", sum.v_rev); - (void)printf("%11u VM object cache lookups\n", sum.v_lookups); - (void)printf("%11u VM object hits\n", sum.v_hits); - (void)printf("%11u total VM faults taken\n", sum.v_vm_faults); - (void)printf("%11u copy-on-write faults\n", sum.v_cow_faults); - (void)printf("%11u pages freed by daemon\n", sum.v_dfree); - (void)printf("%11u pages freed by exiting processes\n", sum.v_pfree); - (void)printf("%11u pages free\n", sum.v_free_count); - (void)printf("%11u pages wired down\n", sum.v_wire_count); - (void)printf("%11u pages active\n", sum.v_active_count); - (void)printf("%11u pages inactive\n", sum.v_inactive_count); - (void)printf("%11u bytes per page\n", sum.v_page_size); -#endif if (nlistf == NULL && memf == NULL) { size = sizeof(nchstats); diff --git a/usr.bin/w/Makefile b/usr.bin/w/Makefile index 7bcd8f22672..718711bb43b 100644 --- a/usr.bin/w/Makefile +++ b/usr.bin/w/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2001/03/25 20:11:08 millert Exp $ +# $OpenBSD: Makefile,v 1.5 2001/06/27 06:16:51 art Exp $ PROG= w SRCS= fmt.c pr_time.c proc_compare.c w.c @@ -13,6 +13,3 @@ LINKS= ${BINDIR}/w ${BINDIR}/uptime .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif diff --git a/usr.sbin/pstat/Makefile b/usr.sbin/pstat/Makefile index acb3e77820b..bc9d8d6a5bf 100644 --- a/usr.sbin/pstat/Makefile +++ b/usr.sbin/pstat/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2000/09/03 18:41:22 espie Exp $ +# $OpenBSD: Makefile,v 1.6 2001/06/27 06:16:52 art Exp $ PROG= pstat MAN= pstat.8 @@ -9,7 +9,4 @@ LDADD= -lkvm .include <bsd.prog.mk> -.if (${UVM:L} == "yes") -CFLAGS+=-DUVM -.endif |