From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 20 06:50:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B4F3106564A; Fri, 20 Jul 2012 06:50:58 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB218FC1F; Fri, 20 Jul 2012 06:50:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6K6owDv066203; Fri, 20 Jul 2012 06:50:58 GMT (envelope-from pgj@svn.freebsd.org) Received: (from pgj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6K6owvO066198; Fri, 20 Jul 2012 06:50:58 GMT (envelope-from pgj@svn.freebsd.org) Message-Id: <201207200650.q6K6owvO066198@svn.freebsd.org> From: Gabor Pali Date: Fri, 20 Jul 2012 06:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238647 - in stable/9: sys/kern sys/sys usr.bin/procstat X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2012 06:50:58 -0000 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 = "--";