Permalink
Browse files

Merge branch 'gcc4' of git.joyent.com:illumos-joyent into gcc4

  • Loading branch information...
2 parents d6f9034 + 6a5fc13 commit 92fb61a58dea0e097df79e73d3cda1bef52c4339 @JohnSonnenschein JohnSonnenschein committed Jan 26, 2012
Showing with 1,002 additions and 151 deletions.
  1. +2 −0 manifest
  2. +8 −0 usr/src/cmd/fs.d/nfs/mountd/mountd.c
  3. +8 −0 usr/src/cmd/fs.d/nfs/nfsd/nfsd.c
  4. +2 −1 usr/src/cmd/rcap/rcapd/rcapd_scanner.c
  5. +15 −2 usr/src/cmd/savecore/savecore.c
  6. +3 −2 usr/src/cmd/stat/Makefile
  7. +50 −0 usr/src/cmd/stat/zschedstat/Makefile
  8. +335 −0 usr/src/cmd/stat/zschedstat/zschedstat.c
  9. +7 −2 usr/src/cmd/truss/print.c
  10. +85 −98 usr/src/cmd/zoneadmd/mcap.c
  11. +1 −2 usr/src/lib/brand/joyent/zone/statechange.ksh
  12. +8 −0 usr/src/lib/brand/kvm/zone/kinstall.ksh
  13. +1 −2 usr/src/lib/brand/kvm/zone/statechange.ksh
  14. +36 −2 usr/src/lib/libumem/common/envvar.c
  15. +29 −3 usr/src/lib/libumem/common/umem.c
  16. +2 −3 usr/src/lib/libumem/common/umem_impl.h
  17. +2 −0 usr/src/lib/libumem/common/vmem.c
  18. +2 −2 usr/src/lib/libumem/common/vmem_base.c
  19. +3 −2 usr/src/lib/libumem/common/vmem_base.h
  20. +2 −0 usr/src/man/man1m/Makefile
  21. +202 −0 usr/src/man/man1m/zschedstat.1m
  22. +57 −3 usr/src/uts/common/disp/fss.c
  23. +4 −0 usr/src/uts/common/fs/nfs/nfs_server.c
  24. +5 −1 usr/src/uts/common/os/kstat_fr.c
  25. +13 −0 usr/src/uts/common/os/zone.c
  26. +8 −0 usr/src/uts/common/sys/buf.h
  27. +4 −0 usr/src/uts/common/sys/fss.h
  28. +2 −0 usr/src/uts/common/sys/mman.h
  29. +20 −1 usr/src/uts/common/sys/zone.h
  30. +7 −2 usr/src/uts/common/syscall/memcntl.c
  31. +2 −0 usr/src/uts/common/vm/hat.h
  32. +7 −5 usr/src/uts/common/vm/seg_vn.c
  33. +22 −6 usr/src/uts/common/vm/vm_pvn.c
  34. +14 −2 usr/src/uts/common/vm/vm_usage.c
  35. +34 −10 usr/src/uts/i86pc/vm/hat_i86.c
View
@@ -2351,6 +2351,7 @@ f usr/bin/zcat 0555 root bin
f usr/bin/ziostat 0555 root bin
s usr/bin/zonename=../../sbin/zonename
f usr/bin/zonestat 0555 root bin
+f usr/bin/zschedstat 0555 root bin
d usr/ccs 0755 root bin
d usr/ccs/bin 0755 root bin
d usr/ccs/bin/amd64 0755 root bin
@@ -11983,6 +11984,7 @@ f usr/share/man/man1m/zic.1m 0444 root bin
f usr/share/man/man1m/zoneadm.1m 0444 root bin
f usr/share/man/man1m/zonecfg.1m 0444 root bin
f usr/share/man/man1m/zpool.1m 0444 root bin
+f usr/share/man/man1m/zschedstat.1m 0444 root bin
f usr/share/man/man1m/zstreamdump.1m 0444 root bin
d usr/share/man/man2 0755 root bin
f usr/share/man/man2/Intro.2 0444 root bin
@@ -20,6 +20,7 @@
*
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2012 Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
@@ -390,6 +391,13 @@ main(int argc, char *argv[])
exit(1);
}
+ /* Mountd cannot run in a non-global zone. */
+ if (getzoneid() != GLOBAL_ZONEID) {
+ (void) fprintf(stderr, "%s: can only run in the global zone\n",
+ argv[0]);
+ exit(1);
+ }
+
maxthreads = 0;
while ((c = getopt(argc, argv, "vrm:")) != EOF) {
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -176,6 +177,13 @@ main(int ac, char *av[])
exit(1);
}
+ /* Nfsd cannot run in a non-global zone. */
+ if (getzoneid() != GLOBAL_ZONEID) {
+ (void) fprintf(stderr, "%s: can only run in the global zone\n",
+ av[0]);
+ exit(1);
+ }
+
(void) enable_extended_FILE_stdio(-1, -1);
/*
@@ -21,6 +21,7 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2012 Joyent, Inc. All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -551,7 +552,7 @@ pageout(pid_t pid, struct ps_prochandle *Pr, caddr_t start, caddr_t end)
errno = 0;
res = pr_memcntl(Pr, start, (end - start), MC_SYNC,
- (caddr_t)(MS_ASYNC | MS_INVALIDATE), 0, 0);
+ (caddr_t)(MS_ASYNC | MS_INVALCURPROC), 0, 0);
debug_high("pr_memcntl [%p-%p): %d", (void *)start, (void *)end, res);
/*
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
#include <stdio.h>
@@ -1501,7 +1502,14 @@ getbounds(const char *f)
long b = -1;
const char *p = strrchr(f, '/');
- (void) sscanf(p ? p + 1 : f, "vmdump.%ld", &b);
+ if (p == NULL || strncmp(p, "vmdump", 6) != 0)
+ p = strstr(f, "vmdump");
+
+ if (p != NULL && *p == '/')
+ p++;
+
+ (void) sscanf(p ? p : f, "vmdump.%ld", &b);
+
return (b);
}
@@ -1635,6 +1643,7 @@ main(int argc, char *argv[])
struct rlimit rl;
long filebounds = -1;
char namelist[30], corefile[30], boundstr[30];
+ dumpfile = NULL;
startts = gethrtime();
@@ -1675,7 +1684,11 @@ main(int argc, char *argv[])
}
}
- if (geteuid() != 0 && filebounds < 0) {
+ /*
+ * If doing something other than extracting an existing dump (i.e.
+ * dumpfile has been provided as an option), the user must be root.
+ */
+ if (geteuid() != 0 && dumpfile == NULL) {
(void) fprintf(stderr, "%s: %s %s\n", progname,
gettext("you must be root to use"), progname);
exit(1);
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2011 Joyent, Inc. All rights reserved.
+# Copyright 2011, 2012, Joyent, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/stat/Makefile
@@ -33,7 +33,8 @@ SUBDIRS= arcstat \
mpstat \
vfsstat \
vmstat \
- ziostat
+ ziostat \
+ zschedstat
all := TARGET = all
install := TARGET = install
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# 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.
+# 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 (c) 2012, Joyent, Inc. All rights reserved.
+#
+
+include $(SRC)/cmd/Makefile.cmd
+
+PROG= zschedstat
+OBJS = zschedstat.o
+SRCS =$(OBJS:%.o=%.c) $(COMMON_SRCS)
+
+LDLIBS += -lkstat
+
+lint := LINTFLAGS = -muxs
+
+.KEEP_STATE:
+
+all: $(PROG)
+
+install: all .WAIT $(ROOTPROG)
+
+clean:
+
+$(ROOTBINPROG): $(PROG)
+ $(INS.file)
+
+lint: lint_SRCS
+
+check:
+ $(CSTYLE) -pP $(SRCS:%=%)
+
+include $(SRC)/cmd/Makefile.targ
Oops, something went wrong.

0 comments on commit 92fb61a

Please sign in to comment.