svn commit: r227317 - head/usr.bin/procstat

Mikolaj Golub trociny at FreeBSD.org
Mon Nov 7 21:16:20 UTC 2011


Author: trociny
Date: Mon Nov  7 21:16:19 2011
New Revision: 227317
URL: http://svn.freebsd.org/changeset/base/227317

Log:
  When displaying process virtual memory mappings print superpage
  mapping flag.
  
  Submitted by:	Mel Flynn <mel.flynn+fbsd.hackers at mailing.thruhere.net>
  Reviewed by:	alc, rwatson

Modified:
  head/usr.bin/procstat/procstat.1
  head/usr.bin/procstat/procstat_vm.c

Modified: head/usr.bin/procstat/procstat.1
==============================================================================
--- head/usr.bin/procstat/procstat.1	Mon Nov  7 21:13:19 2011	(r227316)
+++ head/usr.bin/procstat/procstat.1	Mon Nov  7 21:16:19 2011	(r227317)
@@ -421,6 +421,8 @@ The following mapping flags may be displ
 copy-on-write
 .It N
 needs copy
+.It S
+one or more superpage mappings are used
 .El
 .Sh EXIT STATUS
 .Ex -std

Modified: head/usr.bin/procstat/procstat_vm.c
==============================================================================
--- head/usr.bin/procstat/procstat_vm.c	Mon Nov  7 21:13:19 2011	(r227316)
+++ head/usr.bin/procstat/procstat_vm.c	Mon Nov  7 21:16:19 2011	(r227317)
@@ -50,7 +50,7 @@ procstat_vm(struct kinfo_proc *kipp)
 
 	ptrwidth = 2*sizeof(void *) + 2;
 	if (!hflag)
-		printf("%5s %*s %*s %3s %4s %4s %3s %3s %2s %-2s %-s\n",
+		printf("%5s %*s %*s %3s %4s %4s %3s %3s %3s %-2s %-s\n",
 		    "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
 		    "PRES", "REF", "SHD", "FL", "TP", "PATH");
 
@@ -70,8 +70,9 @@ procstat_vm(struct kinfo_proc *kipp)
 		printf("%3d ", kve->kve_ref_count);
 		printf("%3d ", kve->kve_shadow_count);
 		printf("%-1s", kve->kve_flags & KVME_FLAG_COW ? "C" : "-");
-		printf("%-1s ", kve->kve_flags & KVME_FLAG_NEEDS_COPY ? "N" :
+		printf("%-1s", kve->kve_flags & KVME_FLAG_NEEDS_COPY ? "N" :
 		    "-");
+		printf("%-1s ", kve->kve_flags & KVME_FLAG_SUPER ? "S" : "-");
 		switch (kve->kve_type) {
 		case KVME_TYPE_NONE:
 			str = "--";


More information about the svn-src-all mailing list