Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/pmap Properly print the VM_MAP_TOPDOWN flag if it is...
details: https://anonhg.NetBSD.org/src/rev/25a4ecf297f1
branches: trunk
changeset: 543308:25a4ecf297f1
user: atatat <atatat%NetBSD.org@localhost>
date: Sat Feb 22 17:45:04 2003 +0000
description:
Properly print the VM_MAP_TOPDOWN flag if it is set, document the
VM_MAP_TOPDOWN flag (and the VM_MAP_DYING flag, since it never got
documented before), minor tweak to one of the examples, and use the
UVM_ET_IS*() macros instead of doing the same work manually.
diffstat:
usr.bin/pmap/pmap.1 | 12 ++++++++----
usr.bin/pmap/pmap.c | 31 ++++++++++++++++---------------
2 files changed, 24 insertions(+), 19 deletions(-)
diffs (129 lines):
diff -r 80ed3727714e -r 25a4ecf297f1 usr.bin/pmap/pmap.1
--- a/usr.bin/pmap/pmap.1 Sat Feb 22 12:42:28 2003 +0000
+++ b/usr.bin/pmap/pmap.1 Sat Feb 22 17:45:04 2003 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: pmap.1,v 1.7 2003/02/14 15:59:18 grant Exp $
+.\" $NetBSD: pmap.1,v 1.8 2003/02/22 17:45:04 atatat Exp $
.\"
-.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
@@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 29, 2002
+.Dd February 22, 2003
.Dt PMAP 1
.Os
.Sh NAME
@@ -211,7 +211,7 @@
.Bd -literal -offset indent
$ pmap -d
MAP 0xcf7cac84: [0x0->0xbfbfe000]
- #ent=8, sz=34041856, ref=1, version=20, flags=0x21
+ #ent=8, sz=34041856, ref=1, version=20, flags=0x41
pmap=0xcf44cee0(resident=<unknown>)
- 0xcfa3a358: 0x8048000->0x80b1000: obj=0xcf45a8e8/0x0, amap=0x0/0
submap=F, cow=T, nc=T, prot(max)=5/7, inh=1, wc=0, adv=0
@@ -227,6 +227,8 @@
.It Dv "VM_MAP_WIREFUTURE" Ta No "0x04 future mappings are wired
.It Dv "VM_MAP_BUSY" Ta No "0x08 map is busy
.It Dv "VM_MAP_WANTLOCK" Ta No "0x10 want to write-lock
+.It Dv "VM_MAP_DYING" Ta No "0x20 map is being destroyed
+.It Dv "VM_MAP_TOPDOWN" Ta No "0x40 arrange map top-down
.El
.Pp
The
@@ -337,6 +339,8 @@
.Dq Tn I/W/A
indicates the inheritance, wired, and advice values for the map entry,
as previously described.
+The pointer value at the end of the output line for entries backed by
+vnodes is the address of the vnode in question.
.Sh SEE ALSO
.Xr ls 1 ,
.Xr stat 1 ,
diff -r 80ed3727714e -r 25a4ecf297f1 usr.bin/pmap/pmap.c
--- a/usr.bin/pmap/pmap.c Sat Feb 22 12:42:28 2003 +0000
+++ b/usr.bin/pmap/pmap.c Sat Feb 22 17:45:04 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.10 2003/01/08 20:25:12 atatat Exp $ */
+/* $NetBSD: pmap.c,v 1.11 2003/02/22 17:45:04 atatat Exp $ */
/*
* Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pmap.c,v 1.10 2003/01/08 20:25:12 atatat Exp $");
+__RCSID("$NetBSD: pmap.c,v 1.11 2003/02/22 17:45:04 atatat Exp $");
#endif
#include <string.h>
@@ -151,19 +151,20 @@
printf(" hint_lock = <struct simplelock>,\n");
printf("%*s first_free = %p,", indent(2), "",
D(vm_map, vm_map)->first_free);
- printf(" flags = %x <%s%s%s%s%s%s >,\n", D(vm_map, vm_map)->flags,
+ printf(" flags = %x <%s%s%s%s%s%s%s >,\n", D(vm_map, vm_map)->flags,
D(vm_map, vm_map)->flags & VM_MAP_PAGEABLE ? " PAGEABLE" : "",
D(vm_map, vm_map)->flags & VM_MAP_INTRSAFE ? " INTRSAFE" : "",
D(vm_map, vm_map)->flags & VM_MAP_WIREFUTURE ? " WIREFUTURE" : "",
D(vm_map, vm_map)->flags & VM_MAP_BUSY ? " BUSY" : "",
- D(vm_map, vm_map)->flags & VM_MAP_WANTLOCK ? " WANTLOCK" : ""
+ D(vm_map, vm_map)->flags & VM_MAP_WANTLOCK ? " WANTLOCK" : "",
#ifdef VM_MAP_DYING
- , D(vm_map, vm_map)->flags & VM_MAP_DYING ? " DYING" : ""
+ D(vm_map, vm_map)->flags & VM_MAP_DYING ? " DYING" :
#endif
+ "",
#ifdef VM_MAP_TOPDOWN
- , D(vm_map, vm_map)->flags & VM_MAP_TOPDOWN ? " TOPDOWN" : ""
+ D(vm_map, vm_map)->flags & VM_MAP_TOPDOWN ? " TOPDOWN" :
#endif
- );
+ "");
printf("%*s flags_lock = <struct simplelock>,", indent(2), "");
printf(" timestamp = %u }\n", D(vm_map, vm_map)->timestamp);
}
@@ -305,10 +306,10 @@
printf("%*s offset = %" PRIx64 ",", indent(2), "",
vme->offset);
printf(" etype = %x <%s%s%s%s >,", vme->etype,
- vme->etype & UVM_ET_OBJ ? " OBJ" : "",
- vme->etype & UVM_ET_SUBMAP ? " SUBMAP" : "",
- vme->etype & UVM_ET_COPYONWRITE ? " COW" : "",
- vme->etype & UVM_ET_NEEDSCOPY ? " NEEDSCOPY" : "");
+ UVM_ET_ISOBJ(vme) ? " OBJ" : "",
+ UVM_ET_ISSUBMAP(vme) ? " SUBMAP" : "",
+ UVM_ET_ISCOPYONWRITE(vme) ? " COW" : "",
+ UVM_ET_ISNEEDSCOPY(vme) ? " NEEDSCOPY" : "");
printf(" protection = %x,\n", vme->protection);
printf("%*s max_protection = %x,", indent(2), "",
vme->max_protection);
@@ -452,9 +453,9 @@
printf("\t%*ssubmap=%c, cow=%c, nc=%c, prot(max)=%d/%d, inh=%d, "
"wc=%d, adv=%d\n",
indent(2), "",
- (vme->etype & UVM_ET_SUBMAP) ? 'T' : 'F',
- (vme->etype & UVM_ET_COPYONWRITE) ? 'T' : 'F',
- (vme->etype & UVM_ET_NEEDSCOPY) ? 'T' : 'F',
+ UVM_ET_ISSUBMAP(vme) ? 'T' : 'F',
+ UVM_ET_ISCOPYONWRITE(vme) ? 'T' : 'F',
+ UVM_ET_ISNEEDSCOPY(vme) ? 'T' : 'F',
vme->protection, vme->max_protection,
vme->inheritance, vme->wired_count, vme->advice);
if (verbose) {
@@ -525,7 +526,7 @@
if ((vme->protection & rwx) == 0)
sz = 0;
- if (recurse && (vme->etype & UVM_ET_SUBMAP)) {
+ if (recurse && UVM_ET_ISSUBMAP(vme)) {
struct kbit mkbit, *submap;
recurse++;
Home |
Main Index |
Thread Index |
Old Index