diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/avs/sdbc/sdbc_dynmem.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs | 28 | ||||
| -rw-r--r-- | usr/src/cmd/stat/common/acquire.c | 22 | ||||
| -rw-r--r-- | usr/src/cmd/stat/common/statcommon.h | 21 | ||||
| -rw-r--r-- | usr/src/cmd/stat/vmstat/vmstat.c | 67 | ||||
| -rw-r--r-- | usr/src/pkg/manifests/system-header.mf | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/ufs/ufs_filio.c | 6 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/ufs/ufs_lockfs.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/os/kstat_fr.c | 13 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/Makefile | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/vm.h | 11 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/vmmeter.h | 76 | ||||
| -rw-r--r-- | usr/src/uts/common/vm/vm_pvn.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/sun4/ml/offsets.in | 9 |
14 files changed, 25 insertions, 242 deletions
diff --git a/usr/src/cmd/avs/sdbc/sdbc_dynmem.c b/usr/src/cmd/avs/sdbc/sdbc_dynmem.c index c191c34a2b..f6d25a11f4 100644 --- a/usr/src/cmd/avs/sdbc/sdbc_dynmem.c +++ b/usr/src/cmd/avs/sdbc/sdbc_dynmem.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -49,7 +48,6 @@ #include <sys/buf.h> #include <sys/vfs.h> #include <sys/dnlc.h> -#include <sys/vmmeter.h> #define TRUE 1 #define FALSE 0 diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs b/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs index d35a72689b..5c7227d9ff 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs @@ -20,12 +20,9 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Kstat.xs is a Perl XS (eXStension module) that makes the Solaris * kstat(3KSTAT) facility available to Perl scripts. Kstat is a general-purpose @@ -80,7 +77,6 @@ #include <sys/sysinfo.h> #include <sys/flock.h> #include <sys/dnlc.h> -#include <sys/vmmeter.h> #include <nfs/nfs.h> #include <nfs/nfs_clnt.h> @@ -326,27 +322,6 @@ save_var(HV *self, kstat_t *kp, int strip_str) } /* - * Definition in /usr/include/sys/vmmeter.h - */ - -static void -save_flushmeter(HV *self, kstat_t *kp, int strip_str) -{ - struct flushmeter *flushmeterp; - - /* PERL_ASSERT(kp->ks_ndata == 1); */ - PERL_ASSERT(kp->ks_data_size == sizeof (struct flushmeter)); - flushmeterp = (struct flushmeter *)(kp->ks_data); - - SAVE_UINT32(self, flushmeterp, f_ctx); - SAVE_UINT32(self, flushmeterp, f_segment); - SAVE_UINT32(self, flushmeterp, f_page); - SAVE_UINT32(self, flushmeterp, f_partial); - SAVE_UINT32(self, flushmeterp, f_usr); - SAVE_UINT32(self, flushmeterp, f_region); -} - -/* * Definition in /usr/include/sys/dnlc.h */ @@ -760,7 +735,6 @@ build_raw_kstat_lookup() SAVE_FNP(raw_kstat_lookup, save_cpu_stat, "cpu_stat:cpu_stat"); SAVE_FNP(raw_kstat_lookup, save_var, "unix:var"); - SAVE_FNP(raw_kstat_lookup, save_flushmeter, "unix:flushmeter"); SAVE_FNP(raw_kstat_lookup, save_ncstats, "unix:ncstats"); SAVE_FNP(raw_kstat_lookup, save_sysinfo, "unix:sysinfo"); SAVE_FNP(raw_kstat_lookup, save_vminfo, "unix:vminfo"); diff --git a/usr/src/cmd/stat/common/acquire.c b/usr/src/cmd/stat/common/acquire.c index afc379adeb..b952b8d5e4 100644 --- a/usr/src/cmd/stat/common/acquire.c +++ b/usr/src/cmd/stat/common/acquire.c @@ -19,12 +19,9 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "statcommon.h" #include "dsr.h" @@ -158,7 +155,7 @@ acquire_psets(struct snapshot *ss) ps->ps_id = pids[i - 1]; ps->ps_cpus = - calloc(ss->s_nr_cpus, sizeof (struct cpu_snapshot *)); + calloc(ss->s_nr_cpus, sizeof (struct cpu_snapshot *)); if (ps->ps_cpus == NULL) goto out; } @@ -227,7 +224,7 @@ acquire_intrs(struct snapshot *ss, kstat_ctl_t *kc) ki = KSTAT_INTR_PTR(ksp); (void) strlcpy(ss->s_intrs[i].is_name, ksp->ks_name, - KSTAT_STRLEN); + KSTAT_STRLEN); ss->s_intrs[i].is_total = 0; for (j = 0; j < KSTAT_NUM_INTRS; j++) @@ -322,17 +319,6 @@ retry: fail(1, "kstat_chain_update failed"); } - if (types & SNAP_FLUSHES) { - kstat_t *ksp; - ksp = kstat_lookup(kc, "unix", 0, "flushmeter"); - if (ksp == NULL) { - fail(0, "This machine does not have " - "a virtual address cache"); - } - if (kstat_read(kc, ksp, &ss->s_flushes) == -1) - err = errno; - } - if (!err && (types & SNAP_INTERRUPTS)) err = acquire_intrs(ss, kc); @@ -488,7 +474,7 @@ kstat_add(const kstat_t *src, kstat_t *dst) for (i = 0; i < src->ks_ndata; i++) { /* "addition" makes little sense for strings */ if (from->data_type != KSTAT_DATA_CHAR && - from->data_type != KSTAT_DATA_STRING) + from->data_type != KSTAT_DATA_STRING) (to)->value.ui64 += (from)->value.ui64; from++; to++; diff --git a/usr/src/cmd/stat/common/statcommon.h b/usr/src/cmd/stat/common/statcommon.h index 7ae60ced27..9ee077431d 100644 --- a/usr/src/cmd/stat/common/statcommon.h +++ b/usr/src/cmd/stat/common/statcommon.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * * Common routines for acquiring snapshots of kstats for * iostat, mpstat, and vmstat. @@ -40,7 +39,6 @@ extern "C" { #include <sys/buf.h> #include <sys/dnlc.h> #include <sys/sysinfo.h> -#include <sys/vmmeter.h> #include <sys/processor.h> #include <sys/pset.h> #include <sys/avl.h> @@ -72,22 +70,20 @@ enum snapshot_types { SNAP_SYSTEM = 1 << 2, /* interrupt sources and counts */ SNAP_INTERRUPTS = 1 << 3, - /* cache flushes */ - SNAP_FLUSHES = 1 << 4, /* disk etc. stats */ - SNAP_IODEVS = 1 << 5, + SNAP_IODEVS = 1 << 4, /* disk controller aggregates */ - SNAP_CONTROLLERS = 1 << 6, + SNAP_CONTROLLERS = 1 << 5, /* mpxio L I (multipath) paths: -X: Lun,LunInitiator */ - SNAP_IOPATHS_LI = 1 << 7, + SNAP_IOPATHS_LI = 1 << 6, /* mpxio LTI (multipath) paths: -Y: Lun,LunTarget,LunTargetInitiator */ - SNAP_IOPATHS_LTI = 1 << 8, + SNAP_IOPATHS_LTI = 1 << 7, /* disk error stats */ - SNAP_IODEV_ERRORS = 1 << 9, + SNAP_IODEV_ERRORS = 1 << 8, /* pretty names for iodevs */ - SNAP_IODEV_PRETTY = 1 << 10, + SNAP_IODEV_PRETTY = 1 << 9, /* devid for iodevs */ - SNAP_IODEV_DEVID = 1 << 11 + SNAP_IODEV_DEVID = 1 << 10 }; struct cpu_snapshot { @@ -225,7 +221,6 @@ struct snapshot { size_t s_iodevs_is_name_maxlen; struct sys_snapshot s_sys; struct biostats s_biostats; - struct flushmeter s_flushes; }; /* print a message and exit with failure */ diff --git a/usr/src/cmd/stat/vmstat/vmstat.c b/usr/src/cmd/stat/vmstat/vmstat.c index 2f4aff5f17..f089d554f6 100644 --- a/usr/src/cmd/stat/vmstat/vmstat.c +++ b/usr/src/cmd/stat/vmstat/vmstat.c @@ -1,6 +1,5 @@ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -37,7 +36,7 @@ static int hz; static int pagesize; static double etime; static int lines = 1; -static int swflag = 0, cflag = 0, pflag = 0; +static int swflag = 0, pflag = 0; static int suppress_state; static long iter = 0; static hrtime_t period_n = 0; @@ -53,7 +52,6 @@ static void dovmstats(struct snapshot *old, struct snapshot *new); static void printhdr(int); static void dosum(struct sys_snapshot *ss); static void dointr(struct snapshot *ss); -static void docachestats(kstat_ctl_t *kc, hrtime_t interval, int forever); static void usage(void); int @@ -77,7 +75,7 @@ main(int argc, char **argv) pagesize = sysconf(_SC_PAGESIZE); hz = sysconf(_SC_CLK_TCK); - while ((c = getopt(argc, argv, "cipqsST:")) != EOF) + while ((c = getopt(argc, argv, "ipqsST:")) != EOF) switch (c) { case 'S': swflag = !swflag; @@ -88,9 +86,6 @@ main(int argc, char **argv) case 'i': intr = 1; break; - case 'c': - cflag++; - break; case 'q': suppress_state = 1; break; @@ -121,8 +116,6 @@ main(int argc, char **argv) if (intr) types |= SNAP_INTERRUPTS; - if (cflag) - types |= SNAP_FLUSHES; if (!intr) types |= SNAP_IODEVS; @@ -184,12 +177,6 @@ main(int argc, char **argv) usage(); } - if (cflag) { - free_snapshot(ss); - docachestats(kc, period_n, forever); - exit(0); - } - (void) sigset(SIGCONT, printhdr); dovmstats(old, ss); @@ -512,56 +499,10 @@ dointr(struct snapshot *ss) } static void -docachestats(kstat_ctl_t *kc, hrtime_t interval, int forever) -{ - struct snapshot *old; - struct snapshot *new; - int i; - hrtime_t start; - - start = gethrtime(); - old = acquire_snapshot(kc, SNAP_FLUSHES, NULL); - - if (iter == 0) { - (void) printf("flush statistics: (totals)\n"); - (void) printf("%8s%8s%8s%8s%8s%8s\n", - "usr", "ctx", "rgn", "seg", "pag", "par"); - (void) printf(" %7d %7d %7d %7d %7d %7d\n", - old->s_flushes.f_usr, old->s_flushes.f_ctx, - old->s_flushes.f_region, old->s_flushes.f_segment, - old->s_flushes.f_page, old->s_flushes.f_partial); - return; - } - - (void) printf("flush statistics: (interval based)\n"); - for (i = 0; i < iter; i++) { - if (i % REPRINT == 0) - (void) printf("%8s%8s%8s%8s%8s%8s\n", - "usr", "ctx", "rgn", "seg", "pag", "par"); - - /* Have a kip */ - sleep_until(&start, interval, forever, &caught_cont); - - new = acquire_snapshot(kc, SNAP_FLUSHES, NULL); - - (void) printf(" %7d %7d %7d %7d %7d %7d\n", - new->s_flushes.f_usr - old->s_flushes.f_usr, - new->s_flushes.f_ctx - old->s_flushes.f_ctx, - new->s_flushes.f_region - old->s_flushes.f_region, - new->s_flushes.f_segment - old->s_flushes.f_segment, - new->s_flushes.f_page - old->s_flushes.f_page, - new->s_flushes.f_partial- old->s_flushes.f_partial); - (void) fflush(stdout); - free_snapshot(old); - old = new; - } -} - -static void usage(void) { (void) fprintf(stderr, - "Usage: vmstat [-cipqsS] [-T d|u] [disk ...] " + "Usage: vmstat [-ipqsS] [-T d|u] [disk ...] " "[interval [count]]\n"); exit(1); } diff --git a/usr/src/pkg/manifests/system-header.mf b/usr/src/pkg/manifests/system-header.mf index 25b41f849d..8c8e24d98b 100644 --- a/usr/src/pkg/manifests/system-header.mf +++ b/usr/src/pkg/manifests/system-header.mf @@ -1574,7 +1574,6 @@ file path=usr/include/sys/vm_usage.h file path=usr/include/sys/vmem.h file path=usr/include/sys/vmem_impl.h file path=usr/include/sys/vmem_impl_user.h -file path=usr/include/sys/vmmeter.h file path=usr/include/sys/vmparam.h file path=usr/include/sys/vmsystm.h file path=usr/include/sys/vnode.h diff --git a/usr/src/uts/common/fs/ufs/ufs_filio.c b/usr/src/uts/common/fs/ufs/ufs_filio.c index b4b33435e0..6d63801a5e 100644 --- a/usr/src/uts/common/fs/ufs/ufs_filio.c +++ b/usr/src/uts/common/fs/ufs/ufs_filio.c @@ -19,12 +19,9 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/t_lock.h> #include <sys/param.h> @@ -50,7 +47,6 @@ #include <sys/mman.h> #include <sys/pathname.h> #include <sys/debug.h> -#include <sys/vmmeter.h> #include <sys/vmsystm.h> #include <sys/cmn_err.h> #include <sys/filio.h> diff --git a/usr/src/uts/common/fs/ufs/ufs_lockfs.c b/usr/src/uts/common/fs/ufs/ufs_lockfs.c index bbcad8883b..66715344bb 100644 --- a/usr/src/uts/common/fs/ufs/ufs_lockfs.c +++ b/usr/src/uts/common/fs/ufs/ufs_lockfs.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -48,7 +47,6 @@ #include <sys/mman.h> #include <sys/pathname.h> #include <sys/debug.h> -#include <sys/vmmeter.h> #include <sys/vmsystm.h> #include <sys/cmn_err.h> #include <sys/acct.h> diff --git a/usr/src/uts/common/os/kstat_fr.c b/usr/src/uts/common/os/kstat_fr.c index 29c9054f8b..7eab08f982 100644 --- a/usr/src/uts/common/os/kstat_fr.c +++ b/usr/src/uts/common/os/kstat_fr.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -46,7 +45,6 @@ #include <sys/vfs.h> #include <sys/dnlc.h> #include <sys/var.h> -#include <sys/vmmeter.h> #include <sys/debug.h> #include <sys/kobj.h> #include <sys/avl.h> @@ -546,15 +544,6 @@ kstat_init(void) kstat_install(ksp); } -#ifdef VAC - ksp = kstat_create("unix", 0, "flushmeter", "hat", KSTAT_TYPE_RAW, - sizeof (struct flushmeter), KSTAT_FLAG_VIRTUAL); - if (ksp) { - ksp->ks_data = (void *) &flush_cnt; - kstat_install(ksp); - } -#endif /* VAC */ - ksp = kstat_create("unix", 0, "var", "misc", KSTAT_TYPE_RAW, sizeof (struct var), KSTAT_FLAG_VIRTUAL); if (ksp) { diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 63883cfcbb..acebf3dc1e 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -628,7 +628,6 @@ CHKHDRS= \ vm_usage.h \ vmem.h \ vmem_impl.h \ - vmmeter.h \ vmsystm.h \ vnic.h \ vnic_impl.h \ diff --git a/usr/src/uts/common/sys/vm.h b/usr/src/uts/common/sys/vm.h index 6018c29c93..6f812e2dfa 100644 --- a/usr/src/uts/common/sys/vm.h +++ b/usr/src/uts/common/sys/vm.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2001 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -40,10 +38,7 @@ #ifndef _SYS_VM_H #define _SYS_VM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/vmparam.h> -#include <sys/vmmeter.h> #include <sys/vmsystm.h> #include <sys/sysmacros.h> diff --git a/usr/src/uts/common/sys/vmmeter.h b/usr/src/uts/common/sys/vmmeter.h deleted file mode 100644 index 5da4459347..0000000000 --- a/usr/src/uts/common/sys/vmmeter.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1996 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * University Copyright- Copyright (c) 1982, 1986, 1988 - * The Regents of the University of California - * All Rights Reserved - * - * University Acknowledgment- Portions of this document are derived from - * software developed by the University of California, Berkeley, and its - * contributors. - */ - -#ifndef _SYS_VMMETER_H -#define _SYS_VMMETER_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Virtual Address Cache flush instrumentation. - * - * Everything from f_first to f_last must be unsigned [int]. - */ -struct flushmeter { -#define f_first f_ctx - unsigned f_ctx; /* No. of context flushes */ - unsigned f_segment; /* No. of segment flushes */ - unsigned f_page; /* No. of complete page flushes */ - unsigned f_partial; /* No. of partial page flushes */ - unsigned f_usr; /* No. of non-supervisor flushes */ - unsigned f_region; /* No. of region flushes */ -#define f_last f_region -}; - -#ifdef _KERNEL -#ifdef VAC -/* cnt is 1 sec accum; rate is 5 sec avg; sum is grand total */ -struct flushmeter flush_cnt; -#endif /* VAC */ -#endif /* _KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_VMMETER_H */ diff --git a/usr/src/uts/common/vm/vm_pvn.c b/usr/src/uts/common/vm/vm_pvn.c index 22e7a89a34..7233581227 100644 --- a/usr/src/uts/common/vm/vm_pvn.c +++ b/usr/src/uts/common/vm/vm_pvn.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1986, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -50,7 +49,6 @@ #include <sys/buf.h> #include <sys/vnode.h> #include <sys/uio.h> -#include <sys/vmmeter.h> #include <sys/vmsystm.h> #include <sys/mman.h> #include <sys/vfs.h> diff --git a/usr/src/uts/sun4/ml/offsets.in b/usr/src/uts/sun4/ml/offsets.in index 974c48672e..377cfbd319 100644 --- a/usr/src/uts/sun4/ml/offsets.in +++ b/usr/src/uts/sun4/ml/offsets.in @@ -73,7 +73,6 @@ #define SIZES 1 -#include <sys/vmmeter.h> #include <sys/mutex_impl.h> #include <sys/lockstat.h> #include <sys/ddi_isa.h> @@ -326,14 +325,6 @@ regs REGSIZE \ XXX - doesn't preserve case up above \#define nPC_OFF NPC_OFF -flushmeter FM_SIZE - f_ctx FM_CTX - f_usr FM_USR - f_region FM_REGION - f_segment FM_SEGMENT - f_page FM_PAGE - f_partial FM_PARTIAL - autovec AUTOVECSIZE av_vector av_intarg |
