Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2012 06:50:58 +0000 (UTC)
From:      Gabor Pali <pgj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r238647 - in stable/9: sys/kern sys/sys usr.bin/procstat
Message-ID:  <201207200650.q6K6owvO066198@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pgj (ports committer)
Date: Fri Jul 20 06:50:57 2012
New Revision: 238647
URL: http://svn.freebsd.org/changeset/base/238647

Log:
  MFC r238527:
  
    - Add support for displaying process stack memory regions.
  
  Approved by:	re (kib), rwatson

Modified:
  stable/9/sys/kern/kern_proc.c
  stable/9/sys/sys/user.h
  stable/9/usr.bin/procstat/procstat.1
  stable/9/usr.bin/procstat/procstat_vm.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/usr.bin/procstat/   (props changed)

Modified: stable/9/sys/kern/kern_proc.c
==============================================================================
--- stable/9/sys/kern/kern_proc.c	Fri Jul 20 06:11:26 2012	(r238646)
+++ stable/9/sys/kern/kern_proc.c	Fri Jul 20 06:50:57 2012	(r238647)
@@ -2189,6 +2189,10 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR
 			kve->kve_flags |= KVME_FLAG_NEEDS_COPY;
 		if (entry->eflags & MAP_ENTRY_NOCOREDUMP)
 			kve->kve_flags |= KVME_FLAG_NOCOREDUMP;
+		if (entry->eflags & MAP_ENTRY_GROWS_UP)
+			kve->kve_flags |= KVME_FLAG_GROWS_UP;
+		if (entry->eflags & MAP_ENTRY_GROWS_DOWN)
+			kve->kve_flags |= KVME_FLAG_GROWS_DOWN;
 
 		last_timestamp = map->timestamp;
 		vm_map_unlock_read(map);

Modified: stable/9/sys/sys/user.h
==============================================================================
--- stable/9/sys/sys/user.h	Fri Jul 20 06:11:26 2012	(r238646)
+++ stable/9/sys/sys/user.h	Fri Jul 20 06:50:57 2012	(r238647)
@@ -413,6 +413,8 @@ struct kinfo_file {
 #define	KVME_FLAG_NEEDS_COPY	0x00000002
 #define	KVME_FLAG_NOCOREDUMP	0x00000004
 #define	KVME_FLAG_SUPER		0x00000008
+#define	KVME_FLAG_GROWS_UP	0x00000010
+#define	KVME_FLAG_GROWS_DOWN	0x00000020
 
 #if defined(__amd64__)
 #define	KINFO_OVMENTRY_SIZE	1168

Modified: stable/9/usr.bin/procstat/procstat.1
==============================================================================
--- stable/9/usr.bin/procstat/procstat.1	Fri Jul 20 06:11:26 2012	(r238646)
+++ stable/9/usr.bin/procstat/procstat.1	Fri Jul 20 06:50:57 2012	(r238647)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 23, 2012
+.Dd July 11, 2012
 .Dt PROCSTAT 1
 .Os
 .Sh NAME
@@ -433,6 +433,10 @@ copy-on-write
 needs copy
 .It S
 one or more superpage mappings are used
+.It D
+grows down (top-down stack)
+.It U
+grows up (bottom-up stack)
 .El
 .Sh EXIT STATUS
 .Ex -std

Modified: stable/9/usr.bin/procstat/procstat_vm.c
==============================================================================
--- stable/9/usr.bin/procstat/procstat_vm.c	Fri Jul 20 06:11:26 2012	(r238646)
+++ stable/9/usr.bin/procstat/procstat_vm.c	Fri Jul 20 06:50:57 2012	(r238647)
@@ -72,7 +72,9 @@ procstat_vm(struct kinfo_proc *kipp)
 		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_SUPER ? "S" : "-");
+		printf("%-1s", kve->kve_flags & KVME_FLAG_SUPER ? "S" : "-");
+		printf("%-1s ", kve->kve_flags & KVME_FLAG_GROWS_UP ? "U" :
+		    kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "D" : "-");
 		switch (kve->kve_type) {
 		case KVME_TYPE_NONE:
 			str = "--";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207200650.q6K6owvO066198>